Force between initial system and inserted particles by fix deposit

Please reply to the mailing list, thanks.

Hey Ray,

I thought TIP4P/EW potential would take care of the charges as the atom type was defined.

You need to define the charges explicitly. pair_style lj/cut/tip4p/long only uses the defined charges for its Coulomb interactions; it does not assign charges for you.

I didn’t define the charges in my water box file.

Yes you did: the 4th column are the charges.

Do I need to do that in the molecular file?

Yes, note the warning after your fix deposit command:

fix up_scattering all deposit 1 0 10 8749 region up mol H2O shake water_shake

WARNING: Molecule attributes do not match system attributes (…/molecule.cpp:1350)

The velocity of the deposited molecular was set with velocity command.

That is just a thermal vibration, not a proper incident velocity and certainly would not make your additional H2O to “flying toward the vacuum-water interface”.

Hope this helps.


Thank you Ray! It works after I added the charge information in the molecular file.