**************************************************************************
                        calculate command
                        Leif Laaksonen CSC 2001
			Timm Uhlmann       2003
**************************************************************************
#
# calculate average structure from a trajectory
#

calc$ulate   avst$ructure

#
# calculate backbone dihedral angles for a protein
#

             bbdi$hedrals

#
# calculate the clustering for atoms Seg Res Atm through the frames
# in a trajectory
#

             clus$ter     Seg Res Atm

#
# delete all cluster data
#

            -clu$ster

#
# (re)calculate the atom connectivity information for Seg Res Atm
#

             conn$ectivity Seg Res Atm

#
# calculate hydrogen bonds
#

             hbon$ds      Seg Res Atm
             hbon$ds      Seg Res Atm  Colour
             hbon$ds      Seg Res Atm  {Fred Fgreen Fblue}
             hbon$ds      Seg Res Atm  nohy$drogens
            -hbo$nds

#
# calculate correlation array for distance/angle/torsion array(s) 
# numbered Iserie1 and Iserie2
#

             corr$elation dist$ance  Iserie1 Iserie2
                          angl$e     Iserie1 Iserie2
                          tors$ion   Iserie1 Iserie2

#
# calculate geometrical center for atoms Seg Res Atm
#
 
             geomc$enter  Seg Res Atm

#
# calculate mass center for atoms Seg Res Atm
#

             massc$enter  Seg Res Atm

#
# calculate distance between Seg1 Res1 Atm1 Seg2 Res2 Atm2
#

             dist$ance    Seg1 Res1 Atm1 Seg2 Res2 Atm2

#
# calculate angle between Seg1 Res1 Atm1 Seg2 Res2 Atm2 Seg3 Res3 Atm3
#

             angl$e       Seg1 Res1 Atm1 Seg2 Res2 Atm2 Seg3 Res3 Atm3

#
# calculate torsion between Seg1 Res1 Atm1 Seg2 Res2 Atm2 Seg3 Res3 Atm3 Seg4 Res4
#

             tors$ion     Seg1 Res1 Atm1 Seg2 Res2 Atm2 Seg3 Res3 Atm3 Seg4 Res4 Atm4

#
# calculate mean square displacement for atoms Seg Res Atm using
# geometrical center
#

             msdi$splacement  atom         Seg Res Atm

#
# calculate mean square displacement for atoms Seg Res ATm using
# mass center
#

             msdi$splacement  mass$center  Seg Res Atm

#
# fit the atoms Seg1 Res1 Atm1 in system #1 to
#         atoms Seg2 Res2 Atm2 in system #2
# 0 = numerical display off, 1 = numerical display on
#

             quat$fit     StrucN1 Seg1 Res1 Atm1 StrucN2 Seg2 Res2 Atm2 
			                                                             0/1

#
# calculate root mean square fluctuation for atoms Seg Res Atm
# through the frames
#

             rmsf$luctuation  Seg Res Atm

#
# calculate radial distribution function for atoms Seg2 Res2 Atm2
# calculated from Seg1 Res Atm1. The calculation will only
# be done for the current structure (system) displayed! However
# applying the command successively will add the new calculated
# rdf to the previous one(s) calculated. This enables the calculation
# of rdf  for the full set of frames in a trajectory. To reset the
# calculation apply the "calc -rdf" command.
# To calculate the average from a set of applied "calc rdf" commands
# apply the "calc rdfmean" command.
#

             rdf          Seg1 Res1 Atm1 Seg2 Res2 Atm2 Fcut Tbin
            -rdf
             rdfm$mean


#
#
# calculate a plane from three points
#

         plan$e		fx1 fy1 fz1 fx2 fy2 fz2 fx3 fy3 fz3





**************************************************************************
LUL/2001
**************************************************************************