Dear Lammps users,
I am trying to run a simulation where it is important to identify same atom types as different so that it is always possible to distinguish between them later for visualization and analysis.
So I want to do map these integers to different atom types:
1 = C
2 = H
3 = O
4 = O
5 = O
6 = N
7 = Ca
8 = O
So I created the data file with these different atom types and filled in the mass section as :
1 12.0000 # C
2 1.0564 # H
3 15.9990 # O
4 14.0000 # N
5 32.0600 # S
6 24.3050 # Mg
7 30.9738 # P
8 40.0870 # Ca
9 1.0080 # X
I am not quite sure whether I did this right or not. And in the lammps input file I defined
pair_coeff line as:
pair_coeff * * ffield.reax C H O O O N Ca O X
because the lammps manual for reax/c pair_coeff specifies this usage.
But when I do initial CG run to get minimum energy the dump files on visualization do not make sense as the structure has rings but the output is completely broken structure.
I do not know where I am going wrong, only think I can think of is, probably in the definition of mass section in data file, I need to maintain the correct order as is their in the force field, but even that does not give proper structure on minimization.
Why so complicated? Just use dump cfg, xyz, or image styles that allow you to change atom types via the “dump_modify element” command.
If you don’t use any of the above dump styles, then there is no need to change atom types for visualization purposes, right?
What I am trying to do is mark different kind of O atoms in my system differently. There are 4 types of O atoms in my system, one is part of singly coordinated water molecule, other is part of double coordinated water molecule, third one is part of free water added to the system and the last one is part of a ring of C and N atoms.
So, if I mark them differently from the very outset, it will be easy to carry out calculation later. As I am trying to calculate velocity auto correlation function for each atomic specie and then their density of states and I want to see every individual’s contribution.
So, I have no option other than to mark them differently from the very outset. Can you suggest something based on the problem I explained in the question?
Why don’t you provide this detailed information in the beginning? The replies are always only as good as the questions – the more info you provide the better answers you shall receive.
From what you provided, you still don’t need it to be too complicated. If you are using compute vacf you can just invoke multiple compute vacf and have each apply to different groups that are created for atom types of interest. Something like this:
Group O1 type 3
Group O2 type 4
Compute 1 O1 vacf
Compute 2 O2 vacf
Then you have VACF for all atom types and you can compare each of them to the overall VACF from “compute all all vacf”
All in all, you shouldn’t change the masses for different O types in your system as that changes the dynamics. You can have whatever atom types in your data file but with the correct corresponding masses. Then in the pair_coeff command you define “C H O O O N Ca O X”.
Thanks Ray for your time and reply, it was really really detailed and helpful. I can not use LAMMPS VACF because it just computes the velocity auto correlation function with one initiial condition, I am calculating it with many initial conditions introduced at some regular intervals, overall your reply contains the solution to my problem.
Like Ray mentioned, the mass of the ‘fake’ atoms should follow the the mass of ‘real’ atoms. For example, you swapped atom type #4, #5, and #8 from O to other atoms. The mass of 3, 4, 5, and 8 should be the mass of O. Other atoms should be the same as well, the mass of ‘swapped’ atoms should follow the mass of ‘real original’ atoms.
Thanks JeJoon for your reply, it was really helpful.