- Periodic boundary conditions
- Spherical harmonic boundary conditions
- Cylindrical harmonic boundary conditions

In addition to periodic boundary conditions, NAMD provides spherical and
cylindrical boundary potentials to contain atoms in a given volume.
To apply more general boundary potentials written in Tcl, use
`tclBC` as described in Sec. 8.11.

NAMD provides periodic boundary conditions in 1, 2 or 3 dimensions. The following parameters are used to define these boundary conditions.

basis vector for periodic boundaries (Å)`cellBasisVector1`**Acceptable Values:**vector**Default Value:**0 0 0**Description:**Specifies a basis vector for periodic boundary conditions.basis vector for periodic boundaries (Å)`cellBasisVector2`**Acceptable Values:**vector**Default Value:**0 0 0**Description:**Specifies a basis vector for periodic boundary conditions.basis vector for periodic boundaries (Å)`cellBasisVector3`**Acceptable Values:**vector**Default Value:**0 0 0**Description:**Specifies a basis vector for periodic boundary conditions.center of periodic cell (Å)`cellOrigin`**Acceptable Values:**position**Default Value:**0 0 0**Description:**When position rescaling is used to control pressure, this location will remain constant. Also used as the center of the cell for wrapped output coordinates.XSC file to read cell parameters from`extendedSystem`**Acceptable Values:**file name**Description:**In addition to .coor and .vel output files, NAMD generates a .xsc (eXtended System Configuration) file which contains the periodic cell parameters and extended system variables, such as the strain rate in constant pressure simulations. Periodic cell parameters will be read from this file if this option is present, ignoring the above parameters.XST file to write cell trajectory to`XSTfile`**Acceptable Values:**file name**Default Value:***outputname*`.xst`**Description:**NAMD can also generate a .xst (eXtended System Trajectory) file which contains a record of the periodic cell parameters and extended system variables during the simulation. If`XSTfile`is defined, then`XSTfreq`must also be defined.how often to append state to XST file`XSTfreq`**Acceptable Values:**positive integer**Description:**Like the`DCDfreq`option, controls how often the extended system configuration will be appended to the XST file.wrap all coordinates around periodic boundaries?`wrapAll`**Acceptable Values:**on or off**Default Value:**off**Description:**Coordinates are normally output relative to the way they were read in. Hence, if part of a molecule crosses a periodic boundary it is not translated to the other side of the cell on output. This option applies a translation to the center-of-mass of each molecule or contiguous cluster of bonded atoms to keep it within the periodic unit cell. The translation has usually*no effect on the physical trajectory*, because the force field potentials used in NAMD follow the minimum-image convention for interatomic distances. However, some complex quantities, for example the center of mass of a multimeric protein, will be undefined as a result of this option. If you plan on applying external forces (`SMD`,`tclForces`or`Colvars`) to such quantities, it is recommended to keep this option off, and to possibly replace it with a custom restraint.wrap water coordinates around periodic boundaries?`wrapWater`**Acceptable Values:**on or off**Default Value:**off**Description:**This option is similar to the`wrapAll`option, but its effect is restricted to water molecules only.use nearest image to cell origin when wrapping coordinates?`wrapNearest`**Acceptable Values:**on or off**Default Value:**off**Description:**Coordinates are normally wrapped to the diagonal unit cell centered on the origin. This option, combined with`wrapWater`or`wrapAll`, wraps coordinates to the nearest image to the origin, providing hexagonal or other cell shapes.

NAMD provides spherical harmonic boundary conditions. These boundary conditions can consist of a single potential or a combination of two potentials. The following parameters are used to define these boundary conditions.

use spherical boundary conditions?`sphericalBC`**Acceptable Values:**`on`or`off`**Default Value:**`off`**Description:**Specifies whether or not spherical boundary conditions are to be applied to the system. If set to`on`, then`sphericalBCCenter`,`sphericalBCr1`and`sphericalBCk1`must be defined, and`sphericalBCexp1`,`sphericalBCr2`,`sphericalBCk2`, and`sphericalBCexp2`can optionally be defined.center of sphere (Å)`sphericalBCCenter`**Acceptable Values:**position**Description:**Location around which sphere is centered.radius for first boundary condition (Å)`sphericalBCr1`**Acceptable Values:**positive decimal**Description:**Distance at which the first potential of the boundary conditions takes effect. This distance is a radius from the center.force constant for first potential`sphericalBCk1`**Acceptable Values:**non-zero decimal**Description:**Force constant for the first harmonic potential. A positive value will push atoms toward the center, and a negative value will pull atoms away from the center.exponent for first potential`sphericalBCexp1`**Acceptable Values:**positive, even integer**Default Value:**2**Description:**Exponent for first boundary potential. The only likely values to use are 2 and 4.radius for second boundary condition (Å)`sphericalBCr2`**Acceptable Values:**positive decimal**Description:**Distance at which the second potential of the boundary conditions takes effect. This distance is a radius from the center. If this parameter is defined, then`spericalBCk2`must also be defined.force constant for second potential`sphericalBCk2`**Acceptable Values:**non-zero decimal**Description:**Force constant for the second harmonic potential. A positive value will push atoms toward the center, and a negative value will pull atoms away from the center.exponent for second potential`sphericalBCexp2`**Acceptable Values:**positive, even integer**Default Value:**2**Description:**Exponent for second boundary potential. The only likely values to use are 2 and 4.

NAMD provides cylindrical harmonic boundary conditions. These boundary conditions can consist of a single potential or a combination of two potentials. The following parameters are used to define these boundary conditions.

use cylindrical boundary conditions?`cylindricalBC`**Acceptable Values:**`on`or`off`**Default Value:**`off`**Description:**Specifies whether or not cylindrical boundary conditions are to be applied to the system. If set to`on`, then`cylindricalBCCenter`,`cylindricalBCr1`,`cylindricalBCl1`and`cylindricalBCk1`must be defined, and`cylindricalBCAxis`,`cylindricalBCexp1`,`cylindricalBCr2`,`cylindricalBCl2`,`cylindricalBCk2`, and`cylindricalBCexp2`can optionally be defined.center of cylinder (Å)`cylindricalBCCenter`**Acceptable Values:**position**Description:**Location around which cylinder is centered.axis of cylinder (Å)`cylindricalBCAxis`**Acceptable Values:**`x`,`y`, or`z`**Description:**Axis along which cylinder is aligned.radius for first boundary condition (Å)`cylindricalBCr1`**Acceptable Values:**positive decimal**Description:**Distance at which the first potential of the boundary conditions takes effect along the non-axis plane of the cylinder.distance along cylinder axis for first boundary condition (Å)`cylindricalBCl1`**Acceptable Values:**positive decimal**Description:**Distance at which the first potential of the boundary conditions takes effect along the cylinder axis.force constant for first potential`cylindricalBCk1`**Acceptable Values:**non-zero decimal**Description:**Force constant for the first harmonic potential. A positive value will push atoms toward the center, and a negative value will pull atoms away from the center.exponent for first potential`cylindricalBCexp1`**Acceptable Values:**positive, even integer**Default Value:**2**Description:**Exponent for first boundary potential. The only likely values to use are 2 and 4.radius for second boundary condition (Å)`cylindricalBCr2`**Acceptable Values:**positive decimal**Description:**Distance at which the second potential of the boundary conditions takes effect along the non-axis plane of the cylinder. If this parameter is defined, then`cylindricalBCl2`and`spericalBCk2`must also be defined.radius for second boundary condition (Å)`cylindricalBCl2`**Acceptable Values:**positive decimal**Description:**Distance at which the second potential of the boundary conditions takes effect along the cylinder axis. If this parameter is defined, then`cylindricalBCr2`and`spericalBCk2`must also be defined.force constant for second potential`cylindricalBCk2`**Acceptable Values:**non-zero decimal**Description:**Force constant for the second harmonic potential. A positive value will push atoms toward the center, and a negative value will pull atoms away from the center.exponent for second potential`cylindricalBCexp2`**Acceptable Values:**positive, even integer**Default Value:**2**Description:**Exponent for second boundary potential. The only likely values to use are 2 and 4.