[lammps-users] Using read_data command twice

Dear lammps users,
I need to use ‘read_data’ command twice in my input script file. First ‘read_data’ has box dimensions and atom bond dihedral type information. Then after I specify force field type and coefficients. Now I need to use ‘read_data’ again to provide topology information. But I am unable to do so because lammps gives me the error:Subsequent read data induced too many bonds per atom
I have used ‘read_data file add merge style’. Merge style should add id’s without changing them. Any suggestions on what change I should make?

Regards

Abhiram

force_field.data (6.95 KB)

in.cnt_pnc (2.78 KB)

box_dimensions.data (213 Bytes)

pnc_0.6.data (300 KB)

a) your reasoning does not make sense. your explanation does not justify multiple data file reads
b) the documentation clearly explains that the number of atom/bond/angle/dihedral/etc types and the number of bonds/angles/dihedrals/special per atom can only be set on the very first read_data command since that defines the box and these and a few other properties cannot be changed after the simulation box is defined. there are keywords to reserve sufficient space.

axel.

just to confirm. I took your data files and just merged the information from box_dimensions.data in pnc_0.6.data and there is no problem (outside of obvious inconsistencies in the force field definition itself).

Yes, you are right. I can run it now. By inconsistency in force field definition, did you mean the wrong kspace_style used?

Yes, you are right. I can run it now. By inconsistency in force field definition, did you mean the wrong kspace_style used?

yes. or the wrong coulomb style. either way. please note that the MSM implementation in LAMMPS is not using the latest and more efficient algorithms and thus is either slow or not very accurate.

Thanks a lot for your clarifications, Axel.