the format of atomic positions in the output file

Questions and discussions regarding the use of Qbox
Forum rules
You must be a registered user to post in this forum. Registered users may also post new topics if they consider that their subject does not correspond to any topic already present on the forum.
Post Reply
luke419
Posts: 16
Joined: Tue Feb 27, 2024 2:50 am

the format of atomic positions in the output file

Post by luke419 »

Hello,

Thank you for your answers, Francois.
I'd like to visualize the final atomic position of MD simulation.
In the output *.r file of MD simulation, the format of atomic positions and velocities is different from that of initial posistion file (named h2o64.i in the example) used in the ground state calculation.
Would you let me know how I can obtain the positions and/or velocities of the final structure in the format of h2o64.i so that I can convert qbox format to cif using utility?

Best regards,
Young
fgygi
Site Admin
Posts: 167
Joined: Tue Jun 17, 2008 7:03 pm

Re: the format of atomic positions in the output file

Post by fgygi »

Hello Young,

You can generate an xyz file for visualization of MD trajectories using the qbox_xyz.py python script provided in the util directory of the Qbox distribution. For example:

Code: Select all

$ qbox_xyz.py mdrun1.r > mdrun1.xyz
To get an xyz file from multiple MD runs, use:

Code: Select all

$ qbox_xyz.py mdrun1.r mdrun2.r > md.xyz
The xyz file can be visualized using tools such as VMD or Avogadro.

Note that if you simulate a liquid, molecules will diffuse away from the primitive unit cell. Qbox does not fold back atomic positions into the primitive unit cell. The reason is that this makes it possible to compute the diffusion coefficient from the root-mean-square displacement of atoms. If you want visualize all atoms folded in the primitive cell for one single snapshot, you must run a separate calculation in which you load the sample and use the fold_in_ws command, e.g.

Code: Select all

load restart.xml
fold_in_ws
run 0
Best,
Francois
Post Reply