CHARMm Principles



5       Setting Constraints and Periodic Boundaries

In CHARMm, a variety of options can help you tailor your files and data to focus on the parts of a system in which you are interested. These include setting constraints on atoms, angles, dihedral angles, and other properties, and introducing periodic boundary conditions in energy calculations.

This chapter explains

Example scripts are found throughout the chapter.


Setting constraints

Constraints can be used during minimization or dynamics as well as during normal mode calculations in order to fix or restrict the motion of specific atoms. Restricting atom movement can:

CHARMm provides seven basic types of constraints:

Fixed atom constraint

The simplest type of constraint is to fix atoms to fixed points in space so that they do not move during a minimization or dynamics simulation. You can then save computation time by calculating only those energy terms that involve at least one atom that is free to move. Energy terms between fixed atoms remain the same between energy evaluation steps. CHARMm automatically omits from the nonbonded and hydrogen bonded lists any interactions that include only fixed atoms.

Harmonic atom constraint

For some applications, it is not desirable to fix atoms, but preferable to allow them some freedom while constraining them to be near a particular position in space. CHARMm achieves this by calculating an additional energy term for all atoms that are to be restrained. This term has the form:

Where:

Econs Constraint energy

ki Force constant

mi Mass of atom i (if mass weighing is used) or 1

ri Position of the atom

r0i Reference position about which the atom is to be centered

exp Exponent

Dihedral constraint

Constraining a dihedral angle formed by four atoms near a selected value is essential for some studies. CHARMm uses a harmonic potential to restrict the motion of a dihedral angle usually to a value close to a reference position. For example, if you are investigating the adiabatic energy barrier to rotation about a bond, you must fix the value of that particular dihedral angle and minimize the rest of the structure subject to the constraint. When the procedure is repeated for a set of values of the angle in the range 0 to 360 degrees, a complete energy profile for rotation about the bond emerges. A similar process is used to generate phi/psi maps and other multi-dimensional energy surfaces for the study of molecular conformations.

Internal coordinate constraint

In addition to specifying dihedral angle constraints, you can apply more general internal coordinate constraints by applying constraints to the bonds, angles, or dihedral angles that have entries in the internal coordinates table. This facility is designed to be global in nature and is not applicable for specific internal coordinates.

Distance constraint

A distance constraint in CHARMm places a potential between two or more atoms to restrain the distance between these atoms to a reference value. The constraining potential used in CHARMm is:

For r < rmin:

Eq. 9     

For rmin < r < rmax:

Eq. 10     

For rmax < r < rlim:

Eq. 11     

For rlim < r:

Eq. 12     

Where rlim is the value of r where the force equals fmax.

This constraint is primarily used for the incorporation of NOE inter-proton distance information into a molecular dynamics simulation.

SHAKE

SHAKE uses an algorithm that restores specified internal coordinates to their reference values after a minimization or dynamics step. Use of the SHAKE algorithm during dynamics can effectively allow for a larger time step during simulation.

Quartic droplet constraint

The quartic droplet constraint term is designed to put the entire molecule in a cage by constructing a constraining sphere around a molecular system. The potential is scaled so that atom positions furthest from the center of the sphere have the greatest restraining force applied.

The quartic droplet constraint term is based on the center of mass or the center of geometry. No net force or torque is introduced by the center of mass term. The potential function is:

Eq. 13     

Example: Creating the alanine dipeptide phi/psi map

This example shows how constraints can be used to explore the conformation space and energetics of a molecule. The core of the example is contained in PHIPSI.STR, where the phi/psi angles of a dipeptide are constrained to specific torsion angles and the molecule's energy is computed to create a potential energy map.

In PHIPSI.STR, two variables are used to hold the phi and psi angles. These variables are then used in two constraints commands:


! Constrain the phi and psi dihedral angles at the current
! values of phi and psi (parameters 1 and 2)
CONS DIHE MAIN 1 CNT MAIN 1 N MAIN 1 CA MAIN 1 C FORC 1000.0 -
MIN @1
CONS DIHE MAIN 1 N MAIN 1 CA MAIN 1 C MAIN 1 NCT FORC 1000.0 -MIN @2
The first command sets a torsional constraint on four atoms:

(MAIN 1 CNT) - (MAIN 1 N) - (MAIN 1 CA) - (MAIN 1 C)

with a force of 1000 kcal/mol and a minimum at @1. This means that the value stored in variable 1 is substituted in this position. The second constraint sets the constraint on the psi torsion angle defined by the atoms N-CA-C-NCT.

The structure is then minimized. This is critical because setting the constraint does not actually change the torsion angle in the structure; it simply moves the minimum of the energy function. Minimization allows the molecule to move to the new low-energy conformation. The dihedral constraints are then removed (CONS CLDH) and the energy of the structure without the constraints is measured. The script then loops and decrements the appropriate values until the entire grid is scanned.

This example uses or creates the following files:

AMINO.BIN

PATCHAH.RTF

PARM.BIN

PHIPSI.STR


*...
* Copyright (c) 1994
* Molecular Simulations Inc.
* All Rights Reserved
*
! Open and read the amino acid topology file, the patch
! topology file, and the parameter file
OPEN READ UNIT 11 FILE NAME "$CHM_DATA/AMINOH.BIN"
READ RTF UNIT 11 FILE
OPEN READ UNIT 12 CARD NAME "$CHM_DATA/PATCHAH.RTF"
READ RTF UNIT 12 CARD APPE
OPEN READ UNIT 13 FILE NAME "$CHM_DATA/PARM.BIN"
READ PARA UNIT 13 FILE
! Read in the sequence, a single alanine residue to
! which a N-acetamide and a C-methylamine patch will
! be applied to simulate an alanine dipeptide
READ SEQU CARD
* Alanine residue for phi/psi map
*
1
ALA
! Generate the segment and apply the patches
GENE MAIN SETUP
! Patch the N & C termini
PATC NACT MAIN 1 SETUP WARN
PATC CMAM MAIN 1 SETUP WARN
! Construct initial coordinates
IC PARA
IC SEED 1 N 1 CA 1 C
IC BUILD
! Fill the nonbonded list with all possible pairs of atoms
! (CUTNB=999Å). Then set the update frequency to 0 because no
! updates are necessary - all nonbonded interactions are
! included.
UPDAT INBFRQ 1000 IHBFRQ 0 CUTNB 999.0 CTONNB 997.0 CTOFNB 998.0 RDIE
UPDAT INBFRQ 0
! Set parameter 0 to 20, the unit to which the energies
! will be written
SET 0 20
! Open a file to store the energies
OPEN WRIT UNIT @0 CARD NAME PHIPSI.MAP
! Stream the looping procedure to create the map
OPEN READ UNIT 30 CARD NAME PHIPSI.STR
STREAM UNIT 30
STOP
Reference stream file


*...
* Copyright (c) 1994
* Molecular Simulations Inc.
* All Rights Reserved
*...
* PHIPSI.STR
*...
* This stream file will loop through all combinations of phi
* and psi at 30 degree increments. The CHARMm parameter 0 is
* required as the output unit for the energies
*...
*
! Set phi and psi to 180
SET 1 180.0
LABEL RESET2
SET 2 180.0
LABEL CONTINUE
! Constrain the phi and psi dihedral angles at the current
! values of phi and psi (parameters 1 and 2)
CONS DIHE MAIN 1 CNT MAIN 1 N MAIN 1 CA MAIN 1 C FORC 1000.0 -MIN @1
CONS DIHE MAIN 1 N MAIN 1 CA MAIN 1 C MAIN 1 NCT FORC 1000.0- MIN @2
! Minimize the structure
MINI POWE NSTEP 2000 TOLGRD 0.001 NPRINT 200
MINI ABNR NSTEP 100 NPRINT 20
! Clear the constraints, and compute the energy
CONS CLDH
ENER
! Write the energy to the unit specified by parameter 0
WRITE TITLE UNIT @0
* fOR PHI = @1, PSI = @2, THE POTENTIAL ENERGY =?ENER
*
! Check values of phi and psi, and continue if necessary
DECR 2 BY 20.0
IF 2 LT -180.0 GOTO RESET1
GOTO CONTINUE
LABEL RESET1
DECR 1 BY 20.0
IF 1 LT -180.0 GOTO MAPDONE
GOTO RESET2
LABEL MAPDONE
RETURN

Example: Using NOE constraints

NOE (or distance) constraints are used in this example to force an extended conformation into a helical conformation. Following a final minimization, the structure is examined to measure the deviations from an idealized geometry.

This example uses or creates the following files:

AMINO.BIN

PARM.BIN

1gcn.pdb


*...
* Copyright (c) 1994
* Molecular Simulations Inc.
* All Rights Reserved
*
! Open and read the amino acid topology file and parameter file
OPEN READ UNIT 11 FILE NAME "$CHM_DATA/AMINO.BIN"
READ RTF UNIT 11 FILE
CLOSE UNIT 11
READ PARAMETERS UNIT 12 FILE
CLOSE UNIT 12
! Open and read the glucagon sequence from the Protein Data
! Bank file; generate the peptide segment
OPEN READ UNIT 13 CARD NAME "1gcn.pdb"
READ SEQUENCE PDB UNIT 13
GENERATE 1GCN SETUP
! Generate initial coordinates for the extended conformation
IC PARAMETERS
IC SEED 1 N 1 CA 1 C
IC BUILD
! Reset the NOE facility
NOE
RESET
END
! Since looping is not supported in the NOE facility, set
! CHARMm parameters and loop labels before starting
! assignments of NOE constraints
SET 1 1
SET 2 4
LABEL START
NOE
! Assign two constraints between the oxygen of residue i and
! the nitrogens of residues i+3 and i+4; scale all constraints
! by 5.0. As the calculation proceeds, the assigned constraints
! will be added to any already present.
ASSIGN SELE ATOM 1GCN @1 O END SELE ATOM 1GCN @2 N END 3.20 0.10 0.20
ASSIGN SELE ATOM 1GCN @1 O END SELE ATOM 1GCN @3 N END 3.10 0.10 0.20
SCALE 5.0
END
! Fix in place all residues except those for which NOE
! constraints have been assigned
CONS FIX SELE.NOT. RESI 1: @3 END
! Minimize all free atoms in the structure (i.e. those atoms in
! residues for which NOE constraints have been assigned)
FAST 1
UPDA INBFRQ 50 IHBFRQ 0 RDIE SHIFT VSHIFT
MINI CONJ NSTEP 100 NPRINT 50
! Update CHARMm parameters; check whether the last residue has
! been processed
INCR 1 BY 1
INCR 2 BY 1
INCR 3 BY 1
IF 3 GT 29 GOTO STOP
GOTO START
LABEL STOP
! Analyze NOE constraints after initial minimization
NOE
ANALYZE
END
! Confirm that no atoms are currently fixed in place
CONS FIX SELE NONE END
! Final minimization of peptide subject only to NOE constraints
MINI CONJ NSTEP 1000 NPRINT 50
! Write coordinates to disk
OPEN WRIT UNIT 16 CARD NAME GLUCNOE.CRD
WRIT COOR UNIT 16 CARD
* Glucagon (alpha helix defined by NOE constraints)
*
! Final analysis of NOE constraints
NOE
ANALYZE
END
STOP


Setting periodic boundaries

CHARMm has general and flexible implementations for introducing periodic boundary conditions in energy calculations. Two such methods are available:

A facility is also available to introduce bond linkages (with additional energy terms including angles, dihedrals, and improper dihedrals) between the primary atoms and the image atoms. This allows important polymers such as DNA or protein alpha helices to be studied. For infinite systems, an asymmetric unit can be studied because rotations and reflections are allowed transformations.

Using image options in CHARMm

An image object is an identical copy of the initially defined atoms (the primary structure) that has been transformed in some way. Many advantages result from using images:

Implementation of image options in CHARMm is general, flexible, and efficient, but some restrictions exist:

Image centering

An important aspect of the image facility is image centering. When image centering is used, molecules that migrate out of the primary structure into one of its image objects reappear in the primary structure from its inverse image object. A constant number of atoms is maintained in the PSF and no molecules are lost, no matter how far they may diffuse during the course of a calculation.

For example, a cube of water as the primary structure is set up with image objects in the positive- and negative-x direction (named XIMG and AIMG, respectively). During a dynamics calculation, one water molecule diffuses along the X axis in the positive direction to the edge and is now closer to molecules in XIMG than the primary structure. The water molecule continues to move into the image XIMG. To compensate, the corresponding water from AIMG can now enter the primary image long the X axis from the negative direction. However, if this water diffuses along the X axis to XIMG, no corresponding water exists in AIMG to compensate for its loss. Therefore, the minimum image convention (or image centering) is invoked, whereby waters that diffuse in the positive-x direction reappear in the negative-x direction.

General procedure

The general procedure for using images in CHARMm follows the steps outlined below:

1.   Construct the PSF for the primary structure.

2.   Provide the Cartesian coordinates for all atoms in the PSF.

3.   Read in the image transformation file. The commands in this file place each of the defined image objects around the primary structure.

4.   If appropriate, specify image centering.

5.   If necessary, process image patching.

6.   Update the image lists.

7.   Update the nonbonded and hydrogen bonded lists that include both primary and image atoms.

8.   Evaluate the energy of the molecular system. Note that steps 6 and 7 are implicit in this step.

9.   Minimize or integrate equations of motion for a dynamics trajectory.

10.   Repeat steps 8 and 9 as necessary, updating the image, nonbonded, and hydrogen bonded lists only at specified intervals.

Note

Image transformation file

Because no coordinates are stored for image objects, an image transformation file is required for all operations in CHARMm that use the image facility. This file contains commands to define an image object and place it relative to the primary structure.

All defined image objects must have an inverse. An image object and its inverse are always the same distance from the atoms in the primary structure.

Image transformations consist of a rotation, a translation, an inversion, or a mix of any of the three. A convenient scaling operation is also provided. When image atoms are required in an energy calculation, the appropriate transformation matrices are applied to the primary structure coordinates.

The format of the image transformation file is as follows:


* Valid CHARMm title
*
IMAGE transformation subcommands
END
For example, if the primary object is a box of water with 12 Å dimensions, and you want to create images in both the positive- and negative-x directions, the following image transformation file is used:


* Sample Image Transformation File
*
! Scale all transformations by 12.0 in each direction;
! this is the size of the box of water
SCALE 12.0 12.0 12.0
! Define an image object named X
IMAGE X
! Translate this image object in the x-direction; it is
! automatically scaled by the factor define in the SCALE
! subcommand.
TRANSLATE 1.0 0.0 0.0
! Define an object named A and translate this in the
! -x- direction.
IMAGE A
TRANSLATE -1.0 0.0 0.0
! Terminate the image transformation file
END
Remember that all defined objects must have an inverse. If the inverse is assumed to be present, then the time taken to evaluate the primary image energies and forces can be greatly reduced.

Images output

When image lists are updated, information about image centering can be provided if it is requested. The atoms, segments, or residues that are operated upon are listed with the transformation that performed the operation.

After image lists are updated, the numbers of atoms, groups, and residues in each image object as a result of a particular transformation are listed. Only the transformations that are used in the calculation are listed. Their inverses are assumed. Finally, the minimum distance between any atom in the image object and the primary structure is listed.

Because these lists depend on the results of the image list update, the nonbonded and hydrogen bonded lists are regenerated only after the image lists have been updated.

If images are used during any energy calculation, energy values for terms corresponding to the images (such as VDW and electrostatic interaction between the primary and image objects) are printed, in addition to the values for the normal energy terms.

Using crystal options in CHARMm

A crystal of any desired symmetry can be constructed by repeatedly applying a small number of transformations to an asymmetric collection of atoms (the primary structure). The transformations include the primitive lattice translations common to all crystals and a set of additional transformations that determine the space group symmetry. Crystal options generate a data structure of all transformations that produce images lying within a specified cutoff distance of the primary atoms. The data structure can then be used to represent the complete crystal of the system in subsequent calculations.

The CHARMm image facility already enables energies of crystals to be calculated, but the input required to use the facility is often difficult and cumbersome to set up. It is much simpler to introduce an extra data structure that defines the crystal in terms of a set of symmetry operations and lattice translations. This additional data structure can also provide for the optimization of the lattice parameters a, b, c, and , , .

Although the crystal data structure and the values of the lattice parameters define the crystal, individual transformations have to be worked out explicitly in order to calculate energies, harmonic frequencies, and other data. The CHARMm image facility is used for this purpose. Restrictions imposed by the use of images, such as the requirement that each image have an inverse, are also present for crystals.

Because crystal patching is not available, bonds between images are not permitted. Similarly, hydrogen bond interactions described by an explicit hydrogen bond function are forbidden. The only forces that can be calculated between primary and image atoms are nonbonded forces.

General procedure

The general procedure for defining and using crystals in CHARMm follows the steps outlined below:

1.   Construct the PSF for the primary structure.

2.   Provide the Cartesian coordinates for all atoms in the PSF.

3.   Define the crystal lattice type.

4.   Specify symmetry operations (transformations).

5.   Update image lists.

6.   Update the nonbonded list that includes both primary and image atoms.

7.   Evaluate the energy of the molecular system.

8.   Minimize the structure and, optionally, lattice parameters.

Crystal data file

The crystal data file is divided into three parts:

Crystal file example

An example of a crystal file for a P212121 crystal is given below. Only the three image transformations defining asymmetric units within the unit cell and inverses are listed:


* Crystal file for a P212121 crystal
*
SYMMETRY
(X,Y,Z)
(X+1/2,-Y+1/2,-Z)
(-X,Y+1/2,-Z+1/2)
(-X+1/2,-Y,Z+1/2)
END
IMAGES
2 0 0 0
3 0 0 0
4 0 0 0
2 -1 0 0
3 0 -1 0
4 0 0 -1
END
Crystal files of this type are automatically produced by CHARMm using the WRITE CRYSTAL command after building the crystal. However, in some cases, it may be necessary for you to construct a unique crystal file using the format described above, and then read the data using the READ CRYSTAL command.

Minimizing crystals

The minimization of crystal lattice parameters (either alone or together with the full structure) is supported by all algorithms except Steepest Descent.

Crystal output

The CRYSTAL BUILD command reads the number of symmetry operations specified, then computes and prints each transformation. The maximum number of transformations allowed by the image facility is 100.

Periodically during minimization, current lattice parameters (and their normalized gradients) are printed together with the standard values for each energy term. The values for lattice parameters, though stored internally, cannot be written to an external file. You must ensure that the proper values are used when you start a crystal energy calculation.

Example: Creating a water box

This script creates a water box with 64 molecules and runs dynamics to equilibrate the structure. The script can be easily customized to create larger boxes or to replace water molecules with another solvent.


* BOX.INP 
*
bomlev 5
OPEN READ UNIT 1 CARD NAME "$CHM_DATA/MASSES.RTF"
read rtf CARD unit 1
OPEN READ UNIT 1 CARD NAME "$CHM_DATA/TIP3.RTF"
read rtf CARD unit 1 append
OPEN READ UNIT 12 CARD NAME "$CHM_DATA/PARM.PRM"
read parameter card unit 12
set g setup warn - ! CUSTOMIZE: GENERATE command options
first none last none noan nodi
set m tip3 ! CUSTOMIZE: the name of the molecule from RTF
read sequence @m 1
generate solv @g
read coor card unit 5 ! CUSTOMIZE: coordinates
*...
*
3
1 1 TIP3 OH2 .00000 .06577 .00000 SOLV 1 .00000
2 1 TIP3 H1 .75902 -.52198 .00000 SOLV 1 .00000
3 1 TIP3 H2 -.75907 -.52195 .00000 SOLV 1 .00000
coor orie mass
set s x ! generate copies along x axis
set d 3.10432 ! <- CUSTOMIZE displacement
set n 4 ! <- CUSTOMIZE number of copies
stream "box.STR"
set s y ! generate copies along y axis
set d 3.10432 ! <- CUSTOMIZE displacement
set n 4 ! <- CUSTOMIZE number of copies
stream "box.STR"
set s z ! generate copies along z axis
set d 3.10432 ! <- CUSTOMIZE displacement
set n 4 ! <- CUSTOMIZE number of copies
stream "box.STR"
! each solvent molecule is rotated randomly
! around its center of mass
RANDOM UNIFORM SCALE 360. OFFSET -180.
set r ?nres
set i 0
label randomize
incr i by 1
COOR STATistics MASS SELE resid @i END
COOR ROTAte xdir ?RAND ydir ?RAND zdir ?RAND PHI ?RAND -
XCEN ?XAVE YCEN ?YAVE ZCEN ?ZAVE sele resid @i end
if i lt @r goto randomize
! CUSTOMIZE: box dimensions for desired density
! for 64 molecules of water volume should be 1914.608 A^3
! to get 1 Atm pressure at 300K.
set a 12.4173
set b 12.4173
set c 12.4173
shake bond ! use shake for tip3 water <- CUSTOMIZE
crystal define orthorhombic @a @b @c 90. 90. 90.
Crystal Build cutoff 7.0 noperations 0
update inbfrq -1 ihbfrq 0 imgfrq 10 -
CUTNB 9. CTOFNB 7. CTONNB 5. CUTIM 9.
! update inbfrq -1 ihbfrq 0 imgfrq 20 CUTIM 9.
image byres xcen 0. ycen 0. zcen 0.
! mini sd nstep 100 npri 20 tolg 0.9 ixtfrq 0
! run constant volume Langevine dynamics
! to thermalize molecules in the box
! CUSTOMIZE: dynamics parameters
!open write card unit 32 name box.rst
!open write file unit 31 name box.dcd
scalar fbeta set 10.0 sele all end
dyna lang leap strt nstep 100 timestep 0.002 -
tbath 300. rbuf 0. iunrea -30 -
iprfrq 1000 ihtfrq 0 ieqfrq 0 ntrfrq 0 -
nprint 100 nsavc 0 iuncrd -31 nsavv 0 iunwri -32 -
firstt 300.0 finalt 300.0
coor stat
write coor card name "$SCRATCH/box.out"
* thermalized ?nres @m box: a=@a; b=@b; c=@c
*
stop
include box.STR

Example: Solvating glycerol in a box of water

This input file combines many of the concepts discussed thus far. A small molecule is solvated in a box of water. Using periodic boundary conditions, an infinite molecular system is generated. The system is minimized and then a molecular dynamics simulation is run. Various analyses are performed on the resulting trajectory.

This example uses or creates the following files:

GLCSOLINI.CRD

GLCSOLMIN.CRD

GLCSOLA(B).RST

GLCSOLA(B).DCD

GLCSOLA(B).DVL

GLCSOLA(B).ENE

GLCSOLH.CRD

GLCSOLAVG.CRD

GLCSOLDIF.CRD

GLYC.RTF

PARM.BIN

GLYCINI.CRD

WATER1000.CRD

WATER.IMG


*...
* Copyright (c) 1994
* Molecular Simulations Inc.
* All Rights Reserved
*
! Open and read the glycerol topology file; included in this
! RTF is the topology definition for TIP3. Read in the
! standard parameter file.
OPEN READ UNIT 11 CARD NAME GLYC.RTF
READ RTF UNIT 11 CARD
OPEN READ UNIT 12 FILE NAME "$CHM_DATA/PARM.BIN"
READ PARA UNIT 12 FILE
! Generate the solute (one glycerol molecule); read in
! the initial coordinates created in Example 2.4.
READ SEQU CARD
* Glycerol
*
1
GLYC
GENE SOLU SETU
OPEN READ UNIT 13 CARD NAME GLYCINI.CRD
READ COOR UNIT 13 CARD
! Center the solute about the origin.
COOR ORIE
! Read in 125 TIP3 solvent molecules and their
! equilibrated coordinates.
READ SEQU TIP3 125
GENE SOLV SETU NOANGLE
OPEN READ UNIT 14 CARD NAME WATER1000.CRD
READ COOR UNIT 14 CARD APPE
! Delete any waters which overlap the solute.
DELE ATOM SELE ( .BYRES. ( SEGID SOLV .AND. TYPE OH2 .AND. -
( ( .NOT. SEGID SOLV .AND. .NOT. HYDROGEN ) -
.AROUND. 2.60 ) ) ) END
! Write out the initial coordinates of solvated
! glycerol
OPEN WRIT UNIT 08 CARD NAME GLCSOLINI.CRD
WRIT COOR UNIT 08 CARD
* Solvated glycerol: initial coordinates
*
! Set parameter 9 to 15.5516 A, the length of one side
! of the box of water. This value will be used as a scale
! factor for all image transformations.
SET 9 15.5516
! Open and read the image transformation file for creating
! 26 image objects around the primary structure
OPEN READ UNIT 15 CARD NAME WATER.IMG
READ IMAG UNIT 15 CARD
! Apply image centering to all water molecules
IMAGE BYRES XCEN 0.0 YCEN 0.0 ZCEN 0.0 SELE SEGI SOLV END
! Update the nonbonded and image lists; it is not necessary
! to update the hydrogen bond lists as hydrogen bonding
! interactions are accounted for in the force field by
! nonbonded terms. Compute the energy of the system.
UPDA INBFRQ 1 IHBFRQ 0 IMGFRQ 1 CUTNB 30.0 CUTIMG 30.0 -
CDIE VSHI SHIF
ENER
! Print image forces in addition to the image PSF.
PRIN IMAGE FORCES PSF
! Constrain the glycerol molecule to allow for the solvent
! to minimize with respect to the solute.
CONS FIX SELE SEGI SOLU END
UPDA INBFRQ 5 IHBFRQ 0 IMGFRQ 5
MINI ABNR NSTEP 100 TOLGRD 0.0001 NPRINT 25 VSHI SHIF CDIE
! Release constraints and minimize entire structure
CONS FIX SELE NONE END
UPDA INBFRQ 25 IHBFRQ 0 IMGFRQ 25 VSHI SHIF CDIE
MINI ABNR NSTEP 50 TOLGRD 0.0001 NPRINT 5
! Write the minimized coordinates to disk
OPEN WRIT UNIT 08 CARD NAME GLCSOLMIN.CRD
WRIT COOR UNIT 08 CARD
* Solvated glycerol: minimized water
*
! Print the forces of the image object on the primary
! structure.
PRIN IMAG FORCE
! Shake all bonds with hydrogens
SHAKE BONH
! Open the files necessary for the dynamics trajectory:
! A restart file
! A coordinates file (the coordinate trajectory)
! A velocities file (the velocity trajectory)
! An energy file
OPEN WRIT UNIT 31 CARD NAME GLCSOLA.RST
OPEN WRIT UNIT 32 FILE NAME GLCSOLA.DCD
OPEN WRIT UNIT 33 FILE NAME GLCSOLA.DVL
OPEN WRIT UNIT 34 CARD NAME GLCSOLA.ENE
DYNA STRT VERL NSTE 300 TIME 0.001 CDIE IMGFRQ 50 -
IPRFRQ 100 IHTFRQ 50 IEQFRQ 0 INBFRQ 50 IHBFRQ 0 -
IUNREA -1 IUNWRI 31 IUNCRD 32 IUNVEL 33 KUNIT 34 -
NPRINT 50 NSAVC 50 NSAVV 50 -
FIRSTT 0.0 FINALT 300.0 TEMINC 5 -
TWINDH 10.0 TWINDL -10.0 -
IASORS 1 IASVEL 1 ICHECW 0 VSHI SHIF
OPEN WRIT UNIT 41 CARD NAME GLCSOLH.CRD
WRIT COOR UNIT 41 CARD
* COORDINATES AFTER HEATING
*
CLOS UNIT 31
CLOS UNIT 34
OPEN READ UNIT 30 CARD NAME GLCSOLA.RST
OPEN WRIT UNIT 31 CARD NAME GLCSOLB.RST
OPEN WRIT UNIT 32 FILE NAME GLCSOLB.DCD
OPEN WRIT UNIT 33 FILE NAME GLCSOLB.DVL
OPEN WRIT UNIT 34 CARD NAME GLCSOLB.ENE
! Only two picoseconds of equilibration are specified
! here. This is certainly too short a period for
! adequate equilibration of such a large molecular
! system and is included here for illustration
! purposes only.
DYNA REST VERL NSTE 200 TIME 0.001 CDIE IMGFRQ 50 -
IPRFRQ 100 IHTFRQ 0 IEQFRQ 50 INBFRQ 50 IHBFRQ 0 -
IUNREA 30 IUNWRI 31 IUNCRD 32 IUNVEL 33 KUNIT 34 -
NPRINT 50 NSAVC 50 NSAVV 50 -
FIRSTT 0.0 FINALT 300.0 -
TWINDH 10.0 TWINDL -10.0 -
IASORS 0 ISCVEL 0 ICHECW 1 VSHI SHIF
OPEN WRIT UNIT 41 CARD NAME GLCSOLE.CRD
WRIT COOR UNIT 41 CARD
* COORDINATES AFTER EQUILIBRATION
*
CLOS UNIT 30
CLOS UNIT 34
COOR INIT
! Calculate the average structure and isotropic
! fluctuations from the equilibrated dynamics trajectory
OPEN READ UNIT 51 FILE NAME GLCSOLB.DCD
COOR DYNAMIC FIRSTU 51
OPEN WRITE UNIT 16 CARD NAME GLCSOLAVG.CRD
WRITE COOR CARD UNIT 16
* Average structure and isotropic fluctuations
*
! Print the average position and fluctuation for the
! solute and any solvent within 4.0 A of the solute
PRIN COOR SELE .BYRES. ( SEGI SOLU .AROUND. 4.0 ) END
! Compare the minimized coordinates with the
! average coordinates; store the average
! coordinates in the comparison set
COOR COPY COMP
COOR INIT
OPEN READ UNIT 21 CARD NAME GLCSOLMIN.CRD
READ COOR UNIT 21 CARD
CLOSE UNIT 21
COOR DIFF
OPEN WRIT UNIT 22 CARD NAME GLCSOLDIF.CRD
WRIT COOR UNIT 22 CARD
* Difference in atomic positions between dynamics
* average coordinates and minimized coordinates
*
! Print out the difference in position for the
! solute between the minimized and dynamic averaged
! coordinates
PRIN COOR SELE SEGI SOLU END
! Restore the average coordinates to the main set
COOR INIT
COOR COPY
! Fill the internal coordinate arrays with the average
! ic values from the equilibrated dynamics trajectory
IC FILL
OPEN READ UNIT 51 FILE NAME GLCSOLB.DCD
IC DYNA AVERAGE FIRSTU 51
PRINT IC
! Fill the internal coordinate arrays with the
! fluctuations to the ic averages from the free
! dynamics trajectory
OPEN READ UNIT 51 FILE NAME GLCSOLB.DCD
IC DYNA FLUCTUATIONS FIRSTU 51
PRINT IC
STOP

Example: Optimizing an alanine crystal

This example creates an alanine crystal and performs crystal minimization in which both the molecular structure and the lattice parameters are optimized.

This example uses or creates the following files:

ALAINI.CRD

ALA.XTL

ALAXTL.CRD

AMINOH.BIN

PARM.BIN


*...
* Copyright (c) 1994
* Molecular Simulations Inc.
* All Rights Reserved
*
! Open and read the amino acid and parameter data files
OPEN READ UNIT 11 FILE NAME "$CHM_DATA/AMINOH.BIN"
READ RTF UNIT 11 FILE
OPEN READ UNIT 12 FILE NAME "$CHM_DATA/PARM.BIN"
READ PARA UNIT 12 FILE
CLOS UNIT 11
CLOS UNIT 12
! Read in an alanine residue and construct the PSF; define
! initial coordinates
READ SEQU ALA 1 ! Alanine
GENE MAIN SETU
IC PARA
IC SEED 1 N 1 CA 1 C
IC BUILD
! Minimize the initial structure
UPDATE RDIE SHIFT VSHIFT
MINI ABNR NSTEP 500 NPRINT 10 TOLGRD 0.00001 TOLENR 0.00001
OPEN WRIT UNIT 14 CARD NAME ALAINI.CRD
WRIT COOR UNIT 14 CARD
* Initial coordinates for single alanine
*
! Build alanine crystal using P212121 space group
CRYSTAL DEFINE ORTHORHOMBIC 6.0 12.0 6.0 90.0 90.0 90.0
CRYSTAL BUILD NOPER 3 CUTOFF 10.0
(X+1/2,-Y+1/2,-Z)
(-X,Y+1/2,-Z+1/2)
(-X+1/2,-Y,Z+1/2)
OPEN WRIT UNIT 12 CARD NAME ALA.XTL
WRIT CRYS UNIT 12 CARD
* Alanine crystal file
*
! Update the nonbonded and image lists; minimize the
! structure and optimize the lattice parameters
UPDATE IMGFRQ 50 CUTIM 99.0
MINI ABNR NSTEP 500 NPRINT 10 LATTICE -
TOLENR 0.00001 TOLGRD 0.00001
OPEN WRIT UNIT 14 CARD NAME ALAXTL.CRD
WRIT COOR UNIT 14 CARD IMAGE
* Alanine crystal structure
*
STOP


References

Allen, M.P. and Tildesley, D. J., "Periodic Boundary Conditions" and "Potential Truncation." In: Computer Simulations of Liquids, Oxford University Press, Oxford, 1987.




Last updated September 18, 1998 at 04:02PM PDT.
Copyright © 1997, Molecular Simulations, Inc. All rights reserved.