m3g / packmol

Packmol - Initial configurations for molecular dynamics simulations
http://m3g.github.io/packmol
MIT License
214 stars 48 forks source link

Couple minimum distance #26

Closed matteo-northvolt closed 2 years ago

matteo-northvolt commented 2 years ago

Hello,

I was wondering if there is a way to constrain the distance between two atom types or two molecules to be higher than a specific value (e.g. K+ --- Cl- minimum distance 5 Å). In an electrolyte system it frequently happens that when I build the system using packmol the ion-pair is already formed (probably because the volume occupied by the ion and counterion is very small) and I want to avoid this behavior. Any suggestion?

Thanks,

Matteo

lmiq commented 2 years ago

What you can currently do is to define a larger radius for some specific atoms, to try to avoid that. But all other atoms will be repelled by that atom. For example:

tolerance 2.0
structure water.pdb
  number 500
  inside box 0. 0. 0. 30. 30. 30.
  atoms 1
    radius 5
  end atoms
end structure

all atoms will be farther than 5 from atom 1 of the water molecule here. Maybe that alleviates your problem. Maybe if you set larger radii for the charged sites of the ionic liquids.

You cannot, now, set a a specific radius pairwise (a future version of Packmol will allow that, but that is on the list for probably next year only).

matteo-northvolt commented 2 years ago

Thanks Leandro,

this is exactly how I am dealing with it now, I was hoping for some hidden feature :)