Hybrid simulation LAMMPS

Dear All,

I would like to simulate a hybrid system, consisting of two groups, and the main part of the script file like this:

atom_style sph
atom_style molecular
group X type 1 # sph type
group Y type 2 # molecular type

pair_style hybrid dpd 1 1.0 43872 sdpd/taitwater/isothermal 300.0 1.0 76787
pair_coeff 1 1 sdpd/taitwater/isothermal 1.0 1.0 1.0
pair_coeff 2 2 dpd 25.0 4.5 1.0
pair_coeff 1 2 dpd 55.0 4.5 1.0

set type 1 sph/rho 1.0

However, LAMMPS gives error:

ERROR: Cannot set attribute sph/rho for atom style molecular (src/set.cpp:532)

As I understand, I only attribute spa/rho for atom_type sph (type 1), but not to atom_type molecule (type 2).

Thank you very much for any help.


This cannot work. The second atom_style command will wipe out the first. Same as for the pair style, you would need to use a hybrid atom style.

Please also keep in mind that LAMMPS will happily execute all kinds of simulations for as long as the input file syntax is correct, the requirements that it checks for are met, and the simulation results in a numerical stable solution. However, that does not say anything about how meaningful such a simulation is. This particularly applies for all kinds of hybrid systems where it is the job of the user to make certain the model has a sound physical basis and that the cross-interactions between the hybrid subsets are meaningful and suitable to represent the system.

It seems that what you need is the atom_style hybrid. As it is written now, the second atom_style probably just overwrite the first one, therefore LAMMPS assumes that the atom_style molecular is used.

Dear Axel and Simon,

Thank you so much for quick reply. I tried with atom_stype hybrid but the I got error: No bonds allowed with this atom style.

My molecule (defined as atom_style molecular) has bonds. Thanks for any suggestions.


Please study the documentation. All you need to know is given there.