How to use gaff(amber based forcefield) & OPLSAA forcefield together?


I am trying to built a system with PIM1 polymer with both side water on it. Initially I tried to merge the polymer data file with the water in one side of it & test the simulation script. However, when I am trying to do that MPI aborted the job, so I don’t understand which part of my script is wrong. I only
assume there might be any problem while merging or calculating the interaction between water & polymer/ In your reference, I run the polymer in separate simulation with the same force field parameter & also created the water in separate simulation with create atoms command. Both the simulation worked perfectly separately.

I have attached my script and data files with the question. (5.9 KB)
polymer.lmps (2.1 MB)
solvent.lmps (3.2 MB)

Thank you in advance.

Merging two systems like these with multiple read_data command in LAMMPS is very tricky business.
The problem stems from the combination of having data files where not all image flags are zero and that both data files have different box dimensions. The read_data add command will expand the box when loading the second data file to accommodate both systems, but atoms are not remapped as needed so any atom with a non-zero image flag will be displaced by the change of box dimensions incorrectly.

There is no easy fix for that outside of:

  • merging the data files with an external tool which can load the geometries in unwrapped coordinates so that there are no more image flags and box dimensions can be set to anything without implicitly displacing atoms incorrectly.
  • continuing the simulations that produce the data files to try an reset the image flags to the minimum possible values (see reset_atoms command) and then expand the box without scaling the atom positions (see change_box command) and remapping them to the new box. at the end both data files should have the final box dimensions of the merged system and still correct geometries. At this point it would no longer matter to have non-zero image flags, since the box dimensions will not need to be changed by the second read_data command.

Thank you Dr. Axel for your details instructions.