How can I convert xyz to full style lammps data file?

I’m currently working to perform massive MD simulation of amorphous SiO2
with some water + alcohol molecules with lammps reax/c. Lammps reax/c
requires charge style, but I also want to full style to print out & use
molecular ID numbers. Full style also contains charges inside, so it is no
problem to use full style to run lammps reax/c. With charge style, there was
no problem to run lammps reax/c, but full style with same system give me CG
convergence fail warning and simulation stops.

I don’t think that’s what Axel was suggesting. If you use “atom_style charge”, then you can not have bonds in your system. (I’m not sure what happens if you create a data file which has bonds. LAMMPS might simply ignore it, which, for example would cause the “H” and “O” atoms in your water molecules to gradually drift apart from each other. Presumably that’s not what you want. Either way, I don’t think “atom_style full” is related to your problem.)

Figuring out what’s wrong with your old files might take too long.
It sounds like to figure out what is going wrong, you are really going to have to simplify your system. For now, I would start over from scratch, throwing away your old input scripts and data files. Start with simulating one liquid at a time. Then try combining them.

Both topotools and moltemplate come with examples how to build a simple box of water, and there are examples for building other molecules, and mixing them together. Start with a tiny box of water with 64 water molecules (4x4x4 for example). See if you can get that system to run at constant pressure without crashing.

If you have a data file containing ethanol molecules, for example, you can extract one of them (using a text editor, or “ltemplify.py”, or perhaps “pizza.py”). If you have not already decided the force-field parameters you are going to use, you could build an ethanol molecule easily using the OPLSAA force-field plugins that come with moltemplate (by Jason Lambert), OR the CHARMM force-field plugin for topotools (by Josh Vermaas).

Then try adding the SiO2 slab. If you have an existing data file containing the SiO2 atom positions, then you can read it into moltemplate (sing the “ltemplify.py” utility), or into topotools, and then combine it with the solvent. (You will have to use a “hybrid” pair style, and add additional “pair_coeff” commands to describe the interaction between all of the solvent atom types and the SiO2 atoms. You will have to look up appropriate force-field parameters from the literature, assuming you haven’t done all this already. Or you can attempt to calculate them, buut somebody probably has already done that for you, so check the literature first. Anyway, this step is the hardest part.)

Instructions for using VMD to look at your system are attached. (In particular, check the periodic boundary conditions to make sure molecules are not overlapping with each other across the boundary.)

Cheers

Andrew

README_visualize.txt (2.42 KB)

> I'm currently working to perform massive MD simulation of amorphous SiO2
> with some water + alcohol molecules with lammps reax/c. Lammps reax/c
> requires charge style, but I also want to full style to print out & use
> molecular ID numbers. Full style also contains charges inside, so it is
no
> problem to use full style to run lammps reax/c. With charge style, there
was
> no problem to run lammps reax/c, but full style with same system give me
CG
> convergence fail warning and simulation stops.

I don't think that's what Axel was suggesting. If you use "atom_style
charge", then you can not have bonds in your system. (I'm not sure what
happens if you create a data file which has bonds. LAMMPS might simply
ignore it, which, for example would cause the "H" and "O" atoms in your
water molecules to gradually drift apart from each other. Presumably
that's not what you want. Either way, I don't think "atom_style full" is
related to your problem.)

​when running simulations with reaxFF, there must not be any bonds in the
data file. bonds are computed internally ​in the reax/c pair style. the
presence of explicit bonds will exclude pairs from the neighbor lists, but
they are required for reaxFF.

also, bond information and molecule identities can change over time. the
USER-REAXC package contains two fixes to output the molecular composition
and (dynamic) atom and bond information. please see the corresponding
documentation.

axel.