How to Define Molecule (Hyrocarbon) in data file

Dear LAMMPS users,

I use atomic style and Metal units for my simulation. I created a pdb file for one hydrocarbon molecule with Avogadro and then created 1000 molecules in another pdb file using packmol. Also, I use airobe-m potential, which I don’t need to define bond, angle, etc.
For creating the data-file, I changed the pdb file format to the following format, which I did not assign each atom to a molecule number. To be more specific, the following data is inserted in each column:
1-Atom No 2-Atom Type 3- X coord 4- Y coord 5- Z coord : sample:

29000 atoms
2 atom types

0 67 xlo xhi
0 67 ylo yhi
0 67 zlo zhi

Masses
1 12.0107 # C
2 1.00784 # H

Atoms
1 1 27.994 16.488 59.012
2 1 27.99 16.242 57.502
3 1 27.014 17.21 56.83
4 1 29.397 16.467 56.945
5 1 30.339 15.39 57.487
.
.
.

My question is that should I assign each atom to its molecule by adding another column that consists of molecule No.? (as each molecule has 29 atoms, I put first 29 rows as 1, second 29 rows as 2, etc.)
Or, by any other way, should I define each molecule for LAMMPS?
Also is there any other data necessary to be added in another column?

Hello,

With ‘atomic’ style there is no need for molecule id. However, I am a bit surprised that you have no bond nor charge information in the data file for modeling such molecule, and I doubt that ‘atomic’ style is the right one, ‘full’ (with additional bond and charge) is probably a more suitable option. What pair_style are you planning to use?

Best,

Simon

Thanks for your reply. Since you gave me your advice through email, I will post the pair-style here that other users maybe want to be involved in this subject.

I use:

pair_style hybrid/overlay airebo/morse 3.0 1 1 eam/alloy lj/cut 13

airebo/morse for hydrocarbon molecules

eam/alloy for Aluminium

lj/cut for interactions between Al and H, and C.

You don’t have to assign molecular IDs. They don’t have any impact on a simulation. Keep in mind though, that your molecules can react with each other since you use AIREBO-M. For this pair_style you only need atom coordinates, so your data file should work.

@simongravelle
AIREBO-M is a reactive force field which doesn’t use charges or classic topology.

Please note that that email was due to your forum communication settings. You get an email (and can respond via email), if your settings allow it. By default, you should receive an email for any response to your forum posts.

As a beginner, this is quite a challenging setup. I would strongly recommend to first do simulations for each subsystem (as bulk systems) separately and confirm that you can reproduce published results with the simulation settings that you choose (and make sure they are compatible with each other).

Hi
Reactive force fields as rebo, reaxff, comb3 do not treat molecules but atoms. The force fields define the resulting bonds and angles. For reaxff and comb3, variable charge is included so units charge is required. For rebo and variants charge are not included. So no charge and molecule id are required when using it.
Best
Pascal

Sorry I miss your answer @mkanski when replying similarly.
Best

1 Like

@mkanski Thank you for your response in this regard.

@akohlmey Thank you for your advice. Since I may ask some basic questions to be assured about my LAMMPS codes, I thought it is more appropriate to ask my questions in LAMMPS Beginners.
Actually, I have done other simulations separately for each subsystem and confirmed them with published results. But I am at beginning of doing the simulation for the whole system, and I have many issues in this regard, which your advice would be very helpful in this regard.

@pascalbrault Many thanks for your comprehensive answer.

Hi,

I have another question. May I use full atom-style when I use airebo-m potential (instead of atomic style) or reaxff potential (instead of charge style)? (which enables me to put more atom properties information in my data file), or I have to use only fix property/atom command with atomic style for defining more per-atom properties?

Because it is easier to define more atom properties initially in data file in a case I need charge (q) for Coulomb reactions or even molecule ID.

@pascalbrault @akohlmey @mkanski

Hi
I think that rebo + coulomb can be replaced by reaxff which includes Coulomb forces + charge equilibration. So the work requires a suitable parameter file for your problem. It probably exists since reaxff was primarily built for hydrocarbon combustion.
Best
Pascal

Yes, you can use atom style full since it is a superset of atom style atomic. The downside is that it requires more memory per atom, since it allocates storage for properties you don’t use. So if you just want to add molecule IDs, the closest option would be atom style bond. Adding per-atom charge information can then be achieved using atom_style hybrid bond charge which is the union of the properties of the bond and the charge atom style.

For your simulation, you have to be very careful to not add any bond topology information, since that will affect the neighbor lists due to exclusions unless you also change the special_bonds setting to not exclude bonded neighbors from non-bonded interactions.

Many thanks for your answer.

Thank you for your information.