#include #include using namespace std; double PBC; int main(int argc, char* argv[]) {cout << "color Display Background white" << endl; cout << "display projection Orthographic" << endl; cout << "axes location Off" << endl; cout << "display resetview" << endl; cout << "mol default representation VDW" << endl; cout << "mol representation VDW 0.3000 20.00" << endl; fstream fin("pbc.dat"); for (int i=1; i < 10; i++) { fin >> PBC; int j= i-1; cout << "mol new structure00" << i << ".pdb" << endl; cout << "mol addfile structure00" << i << ".psf" << endl; cout << "pbc box -on" << endl; cout << "pbc set {" << PBC << " " << PBC << " " << PBC << "}" << endl; cout << "pbc box -color black" << endl; cout << "mol modselect 0 " << j << " mass >= 0" << endl; cout << "mol modcolor 0 " << j << " ColorID 4" << endl; cout << "mol modselect 1 " << j << " charge < 0.20" << endl; cout << "mol modcolor 1 " << j << " ColorID 0" << endl; cout << "mol color ColorID 0" << endl; cout << "mol representation VDW 0.300000 20.000000" << endl; cout << "mol selection charge < 0.20" << endl; cout << "mol material Opaque" << endl; cout << "mol addrep " << j << endl; cout << "mol modselect 2 " << j << " mass < 0.20" << endl; cout << "mol modcolor 2 " << j << " ColorID 1" << endl; cout << "mol color ColorID 1" << endl; cout << "mol representation VDW 0.300000 20.000000" << endl; cout << "mol selection mass < 0.20" << endl; cout << "mol material Opaque" << endl; cout << "mol addrep " << j << endl; cout << "mol modselect 3 " << j << " type O" << endl; cout << "mol modcolor 3 " << j << " ColorID 7" << endl; cout << "scale to .05" << endl; cout << "rotate y by -20" << endl; cout << "rotate x by 15" << endl; cout << "render snapshot structure3_00" << i << ".bmp" << endl; cout << "mol delete all" << endl; cout << "display resetview" << endl; } for (int i=10; i < 100; i++) { int j= i-1; fin >> PBC; cout << "mol new structure0" << i << ".pdb" << endl; cout << "mol addfile structure0" << i << ".psf" << endl; cout << "pbc box -on" << endl; cout << "pbc set {" << PBC << " " << PBC << " " << PBC << "}" << endl; cout << "pbc box -color black" << endl; cout << "mol modselect 0 " << j << " mass >= 0" << endl; cout << "mol modcolor 0 " << j << " ColorID 4" << endl; cout << "mol modselect 1 " << j << " charge < 0.20" << endl; cout << "mol modcolor 1 " << j << " ColorID 0" << endl; cout << "mol color ColorID 0" << endl; cout << "mol representation VDW 0.300000 20.000000" << endl; cout << "mol selection charge < 0.20" << endl; cout << "mol material Opaque" << endl; cout << "mol addrep " << j << endl; cout << "mol modselect 2 " << j << " mass < 0.20" << endl; cout << "mol modcolor 2 " << j << " ColorID 1" << endl; cout << "mol color ColorID 1" << endl; cout << "mol representation VDW 0.300000 20.000000" << endl; cout << "mol selection mass < 0.20" << endl; cout << "mol material Opaque" << endl; cout << "mol addrep " << j << endl; cout << "mol modselect 3 " << j << " type O" << endl; cout << "mol modcolor 3 " << j << " ColorID 7" << endl; cout << "scale to .05" << endl; cout << "rotate y by -20" << endl; cout << "rotate x by 15" << endl; cout << "render snapshot structure3_0" << i << ".bmp" << endl; cout << "mol delete all" << endl; cout << "display resetview" << endl; } for (int i=100; i < 102; i++) { int j= i-1; fin >> PBC; cout << "mol new structure" << i << ".pdb" << endl; cout << "mol addfile structure" << i << ".psf" << endl; cout << "pbc box -on" << endl; cout << "pbc set {" << PBC << " " << PBC << " " << PBC << "}" << endl; cout << "pbc box -color black" << endl; cout << "mol modselect 0 " << j << " mass >= 0" << endl; cout << "mol modcolor 0 " << j << " ColorID 4" << endl; cout << "mol modselect 1 " << j << " charge < 0.20" << endl; cout << "mol modcolor 1 " << j << " ColorID 0" << endl; cout << "mol color ColorID 0" << endl; cout << "mol representation VDW 0.300000 20.000000" << endl; cout << "mol selection charge < 0.20" << endl; cout << "mol material Opaque" << endl; cout << "mol addrep " << j << endl; cout << "mol modselect 2 " << j << " mass < 0.20" << endl; cout << "mol modcolor 2 " << j << " ColorID 1" << endl; cout << "mol color ColorID 1" << endl; cout << "mol representation VDW 0.300000 20.000000" << endl; cout << "mol selection mass < 0.20" << endl; cout << "mol material Opaque" << endl; cout << "mol addrep " << j << endl; cout << "mol modselect 3 " << j << " type O" << endl; cout << "mol modcolor 3 " << j << " ColorID 7" << endl; cout << "scale to .05" << endl; cout << "rotate y by -20" << endl; cout << "rotate x by 15" << endl; cout << "render snapshot structure3_" << i << ".bmp" << endl; cout << "mol delete all" << endl; cout << "display resetview" << endl; } fin.close(); return 0; }