Issue with direction-periodic and periodicity during umbrella sampling

A technical point before getting through your questions. To avoid the error you were getting you can i) switch off the barostat, that is, run an NVT sim, as you did, or ii) you can switch it off partially, meaning that you set the compressibility to zero in the direction you are pulling but keep the barostat on. This means that you are still running an NPT simulation but the box can deform only in the directions where the compressibility is not zero, which can be achieved only with a semi-isotropic or an anisotropic pressure coupling. Back in the day I used to do this to generate sampling windows for lipid bilayers, where the pressure coupling is naturally semi-isotropic and I set to zero the compressibility along the z axis (as that was the direction in which I was pulling). I guess your case is a box of water with a protein-ligand system and a isotropic pressure coupling? Then, whether you should completely switch off the barostat is not a easy answer. However, if you have an isotropic coupling, this would mean that you have to switch to a semi-isotropic/anisotropic coupling and then generate the windows. In a situation like yours where the geometry is isotropic by construction this could induce box deformations as all your directions should be coupled together because you have the same phase (water) everywhere. So, I guess the NVT is the safest option with your box? Nevertheless, I would seriously try to understand if those distant sampling windows are really needed or not.

Regarding your questions:

  1. No, that’s actually the opposite. The SMD has a distance that is changing in time, and that’s where I would expect the problem to appear as the reference position becomes ill defined after > 0.5 box length. So I would say that you need the direction-periodic for SMD, and then you can probably revert back to direction during the sampling, as the position is defined once and doesn’t change (too much, if restrained properly). So maybe you can use NVT to generate the windows and revert back to NPT + direction or distance during the sampling? The change of ensemble might not be a problem if you equilibrate the windows in NPT, hoping that the box rescaling won’t change much the windows positioning. Hard to predict without trying, though.

  2. In general, I think yes. NPT and NVT are different ensembles and you are sampling different equilibrium distributions, and therefore different free energies. Whether this will give rise to different free energy profiles is something that cannot be answered in general, but in principle NVT and NPT are technically different ensembles.