How to Compress My System by Perl Script

Dear all,
I want to compress my MD simulation system. That is to say, unchange the xy position of all of atoms in my system and change the z position of all of atoms in my system by multiplys 0.9. How to do it by perl script? Thanks.
Best regards,
Yours
CHNEG Xu
Answers 4
JD
JD 2018-05-31 Best Answer

It looks like the atoms are there, but they are at the bottom of the box.

Try this:

  • Build | Symmetry | Lattice Parameters
  • Advanced tab, make sure "Keep fractional coordinates fixed..." is checked
Of course, you can also modify the lattice in this dialog rather than via script.
JD
JD 2018-05-31
Hi xuxu,

To compress the system in one direction, you just need to change the box length and all of the atom positions are adjusted accordingly:
$doc->Lattice3D->LengthC *= 0.9;

Of course, that is a large change and you should probably do it in smaller increments and optimize during each cycle.


 
XC
XC 2018-05-31
Dear Jason Dejoannis,
I have written your perl script, my system changed from the left one to the right one, as shown in the figure below:The top atoms is missing, how to solve the problem? Thanks.
Best regars,
Yours
CHENGXu
comment imagecomment image
XC
XC 2018-05-31
Dear Jason DeJoannis
Received with thanks.