I want to modify the data file I am getting from VMD in full atom_style, so I can use it with the atome_style hybrid edpd full. I have tried to create the following:
atom-ID atom-type x y z sub-style1 sub-style2 …
as explained in LAMMPS documentation.
for atom_style edpd: atom-ID atom-type edpd_temp edpd_cv x y z
for atom_style full: atom-ID molecule-ID atom-type q x y z
So I assume for ( atom_style hybrid edpd full) , my data file should be like:
atom-ID atom-type x y z edpd_temp edpd_cv molecule-ID q
Is this correct?
my other question is if I do not have any charge is it fine to get rid of the q column, or do I need to have it zero?
Is the data file sensitive to spacing between columns?
I am asking all these because I have tried multiple formats and still I am getting the error: Incorrect atom format in data file
Thank you so much
part of input file :
atom_style hybrid edpd full
region edpd block -50 50 -50 30 -22 23 units box
read_data datatry1.data
When asking about situations where you get error, please always report which LAMMPS version you are using, what platform you are on and - ideally - provide a minimal input deck that can reproduce the error. This will help enormously to provide correct and meaningful advice.
It sounds about right. At least for the current LAMMPS release version.
If you don’t want to include charges, you need to use atom_style hybrid edpd molecular (or build a hybrid with angle or bond if you don’t need dihedrals and impropers, or also don’t need angles). Otherwise the charge data must be present in the data file. Whether data must be present is determined by the atom style; whether it is used is determined by the pair style (and bond/angle/dihedral/improper style etc.).
No. At least not in recent version.
It would really help to see an example that produces the error.
This one works for me for atom_style hybrid edpd fullwith charges , for example:
Thank you so much for your quick and explanatory reply. my lammps version is LAMMPS (29 Sep 2021 - Update 3). I will try the format you told me. I’m editting my question to include some part of the data file.
With the data file I have I am getting the error: " Expected floating point parameter instead of ‘5.091559 1’ in input script or data file (…/atom.cpp:1171)
"
Check your file very carefully. LAMMPS requires that all input is using ASCII characters.
There are non-ASCII characters (in UTF-8 encording) that look exactly or almost the same. This applies to blanks, too. If they are not ASCII characters, LAMMPS may not be able to correctly parse such files.
Thanks a lot akohlmey. What do you recommend to modify the data file? I modified my data file from VMD with excel but saving it as text it seems it changes the format. Is there any better way to modify data files without messing up with it?
You have to use the tools that you are familiar with and then just make sure you use them correctly and request the correct changes.
There are many different ways to introduce additional or move existing columns. I probably would do this with the emacs text editor, because that is what I am most familiar with and that has a functionality for cutting and pasting rectangular regions. If I had to work on a machine where emacs is not available, I would probably split the file into 3 segments (1: up to and including the Atoms keyword, 2: the Atoms section w/o the header, 3: after the Atoms section), then process the middle section with either “awk” or “perl” or “python”, and then paste this modified middle section together with the preserved first and last section.