Questions and problems

Periodic Boundary Conditions: translation across boundaries

When periodic boundary conditions are used in Amber, a system of infinite extent is modeled. It is composed of an infinite number of copies of the primary system cell. Amber only keeps track of one copy of the atoms but calculates forces between them and all other atoms in the infinite system that are relevent to the calculation. For instance, all atoms within a cutoff distance for van der Waals forces, all atoms to infinity for electrostatics with PME are calculated using the positions of the one set of atoms and imaging techniques. It does not matter which cell an atom is in, virtual copies of all atoms exist in all cells for the purposes of energy and force calculations. In this way, if one observes atoms and molecules outside the intial box, it is normal and not an error in imaging. Any molecules appearing outside the initial box are still in the system and have virtual images inside the initial box in the same way that the molecules in the initial box have images outside the initial box. Even when the macromolecule or half of a dimer move out of the box, one will observe that there is a hole on the other side of the initial box where the virtual copy has moved in. Amber uses the philosophy that a researcher may want to have data about the actual motions of molecules throughout a simulation and will not "wrap" molecules back into their initial cell unless requested by the user (see iwrap in sander documentation). For the purposes of visualizing a simulation with all molecules in the same periodic box, ptraj can process a trajectory quickly using image and center commands to produce the desired output.

During the initialization of MD of a solvent in a box of water I have recognized in some cases that a water molecule has slipped out of the box and was lying outside the box. I have detected this from the restart files which was written at the end of each run. Although the water molecule has moved not very far across the z-border of the box I'm wondering if I can go on with this or if there is something serious wrong. From theory I would expect that a molecule can never cross the border because it would be simultaniously inserted back into the box at the opposite side.

The routine that translates molecules back into the "box" is called at the beginning of each MD step. The restart file is written at the end of an MD step. If a molecule passes the box boundary on the step just prior to an restart write, you can find molecules that are (slightly) outside the box.

There is nothing wrong with your simulation, nor is there any problem with using the restart coordinates for a subsequent run. In fact, the imaging process used in Amber is such that it doesn't really matter if molecules appear anywhere in any of the image boxes adjacent to the central box. But in any case, if you read this restart file into Amber, the molecules will be re-translated into the central box before the first MD step.

As result of long run SANDER can push some molecules (in my case it was one of two DNA strands) into neighboring cell.

This is not a "problem" per se, since you are simulating a periodic system; the output files contain only one copy of each molecule in the system.

In your example, there are two straightforward choices:

(1) Use the "iwrap" variable to control which molecules get written to the trajectory and restart files. The discussion of this variable in the manual may also help to clarify what is happening.

(2) Use the "ptraj" program to post-process your restart or trajectory files in order to "image" them more to your liking.