import java.io.File;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
class In{
public static void main(String[] args) throws IOException{
File srcFolder = new File("/POVME_2_0_1/snapshots");
File[] files = srcFolder.listFiles();
File destFolder = new File("/POVME_2_0_1/in");
if (!destFolder.exists()){
destFolder.mkdir();
}
for (File f : files){
String inName ="/POVME_2_0_1/in/"+ f.getName()+".in";
BufferedWriter bw = new BufferedWriter(new FileWriter(inName));
bw.write("GridSpacing 1.0");
bw.newLine();
bw.write("PointsInclusionSphere -9.8 3.9 -1.7 10");
bw.newLine();
bw.write("DistanceCutoff 1.09");
bw.newLine();
bw.write("OutputFilenamePrefix /POVME_2_0_1/out");
bw.newLine();
bw.write("CompressOutput false");
bw.newLine();
String pdbName="PDBFileName "+f.getAbsolutePath();
bw.write(pdbName);
bw.newLine();
bw.write("ConvexHullExclusion true");
bw.newLine();
bw.write("ContiguousPocketSeedSphere -9.8 3.9 -1.7 4");
bw.newLine();
bw.write("NumProcessors 9");
bw.newLine();
bw.write("UseDiskNotMemory false");
bw.newLine();
bw.write("SaveIndividualPocketVolumes true");
bw.newLine();
bw.write("SavePocketVolumesTrajectory false");
bw.newLine();
bw.write("OutputEqualNumPointsPerFrame false");
bw.newLine();
bw.write("SaveTabbedVolumeFile false");
bw.newLine();
bw.write("SaveVolumetricDensityMap false");
bw.newLine();
bw.close();
}
}
}
把源文件夹中的文件名称写入目的文件夹指定后缀的各个文件中
最新推荐文章于 2021-05-27 19:34:00 发布