Dear all,
I load the Gromacs trajectory from TRR file and want to convert to XYZ with the command:
import MDAnalysis as mda
u=mda.Universe('md.tpr','md.trr')
with mda.Writer('md.xyz', n_atoms=u.atoms.n_atoms) as xyz:
for ts in u.trajectory:
xyz.write(ts) I think mdanalysis will understand the atom name in topology (md.tpr format) and write the XYZ format like:
<number of atoms>
comment line
atom_symbol11 x-coord11 y-coord11 z-coord11
but in fact, the result I got is:
1044
frame 0
X 16.44057 1.47570 15.73273
X 15.87332 1.95316 16.33811
X 15.93302 0.70192 15.48798
X 17.21523 7.28262 20.23445
X 17.36406 7.14757 19.29858
X 18.00691 7.72399 20.54212
X 20.12906 8.03738 20.74384
the Atom names are X for all.
How I can solve this problem and I also want to write velocity in xyz format also.
Best regards,
Quyen