Dear users,
I have a question on dump_modify command. The part of my input script which I define is:
dump 2 all xyz 100 md-npt.xyz
dump_modify 2 element O Zn
Does it work only for xyz extension trajectory? I have tried lammpstrj, xtc extensions but It failed to run. And the problem for xyz extension is the box dimension. xyz file does not contain box dimension, so when doing npt I don’t know how much volume of the box is changing to keep the temperature constant. Any suggestion would be appreciated.
Regards
Sasthi
The dump modify doc page explains which options apply to which dump styles. For option
element it says:
The element keyword applies only to the dump cfg, xyz, and image styles.
CFG is read by AtomEye, and it supports character names for elements.
You mention lammpstrj so I assume you want it for VMD. Someone else
can comment on how VMD recognizes elements. But you can’t write
element names in a LAMMPS custom output which is what you would
use for a lammpstrj suffixed file.
Steve
Thank you Steve for the clarification. The main problem of saving in xyz format is that this lost the box information. I dont know about cfg format, is the box information there or not. And other thing is I am using vmd, so if someone tell me, how vmd recognizes elements, it would be great help.
Regards
Sasthi
Pretty sure VMD does not recognize element names (O, Zn) in a LAMMPS dump file
it reads in. So not sure why you are wanting to do this. VMD has its own way
of identifying atom types and colors/sizes.
Steve
actually, dump custom does support the “element” field as an output option and VMD does read and apply it to “name” (but not “type”) property.
so if you use the following two lines in the melt example;
dump id all custom 50 dump.lammpstrj id type element xu yu zu
dump_modify id element Ar
and try to identify atoms by clicking on them, you will get something like the following.
Info) picked atom:
Info) ------------
Info) molecule id: 0
Info) trajectory frame: 5
Info) name: Ar
Info) type: 1
Info) index: 2839
Info) residue: 0
Info) resname: UNK
Info) resid: 0
Info) chain: X
Info) segname:
Info) x: 15.439900
Info) y: -0.012705
Info) z: 12.596900
Info) picked atom:
Info) ------------
Info) molecule id: 0
Info) trajectory frame: 5
Info) name: Ar
Info) type: 1
Info) index: 3848
Info) residue: 0
Info) resname: UNK
Info) resid: 0
Info) chain: X
Info) segname:
Info) x: 3.583450
Info) y: 9.928720
Info) z: 14.792800
axel.
Thank you Axel. dump and dump_modify commands which you suggested are not working for .lammpstrj but it is working for *.xyz only. The error is:
ERROR: Cound not find dump_modify ID (…/output.cpp:621)
Last command: dump_modify 1 element NULL NULL NULL O H H
Regards
Sasthi
Thank you Axel. dump and dump_modify commands which you suggested are not working for .lammpstrj but it is working for *.xyz only. The error is:
ERROR: Cound not find dump_modify ID (…/output.cpp:621)
Last command: dump_modify 1 element NULL NULL NULL O H H
so what is the dump command? (and dump ID)
the error message is straightforward and has nothing to do with the element option.
axel.
Dump command is:
dump 1 all custom 50 dump.lammpstrj id type element xu yu zu …what you suggested me.
if i add the following two lines to the LAMMPS peptide example, it works fine for me:
dump 1 all custom 50 dump.lammpstrj id type element xu yu zu
dump_modify 1 element C C O H N C C C O H H S O H
axel.