How to merge two different data file in one simulation when both have same atom type number?

I am trying to simulate a PIM1 polymer membrane with water on both side. My PIM1 polymer have 11 atomID (1 to 11) types & water has two atomID (1 & 2 ). When I tried to use read_data data.water add merge group solvent , It shows the duplicate ID exists (which obviously as water & PIM both have atomID type 1 & 2). I tried to change the water group ID using set command( set type 1 type 12) but it didn’t work.

Is there any way to merge this two data file together using lammps by changeing the atomID?

You can use the offset keywords of the read_data command to avoid having 2 molecules sharing the same atom types.

Thanks for your reply. However, I thought of using offset keyword but one thing was not clear to me. if I used offset how lammps will understand in the pair coefficient section that which two atom ID I am refereeing to?

For example in my case
pair_coeff 2 2 lj/cut/coul/long 0.1554164124 3.1655200879 # Define O-O interaction of water

But I also have : pair_coeff 2 2 lj/charmm/coul/long 0.059616 3.7 #Define CS0 atom type interaction of the polymer.

How I can distinct that?

If you use offset to change the atom types, then you have to adapt the pair_coeff accordingly. Atom type 2 canno’t be used for 2 differents type of atoms at the same time.

Thank you again for answering. yes , I understood one type can not use for two different atom types which makes sense & I have to adapt it. Is there any specific command or method by which I can adapt the atom type to the newly offset one?

Yes, it is called “addition”. :wink: