Calculation

Available commands: AB , ABC , ABCD , ACCESS , ANALYZE , AVB , AXIS , BRIDGE , DIFF , DISTANCE , EULER , HARKER , CLIQUE , CLOSER , CORRELATION , JIGGLE , MATCH3D , MMIG , MOMENTINERTIA , MOVECENTER , MW , NEWXYZ , OVERLAY , PLANAR , POLAR , RATIO , RMSW , RTN , SHAPE , SORT , SUMW , VECTOR , VM and VOLUME .

EDPDB performs various structural analyses and coordinate rotation-translation operations.

The commands MMIG, MOVECENTER, RTN, HARKER will apply crystallographic symmetry operators on the selected atoms. The commands ANALYZE, OVERLAY, MOMENTINERTIA, MOVECENTER, RTN, AXIS can be used to create, apply and analyze a rotation-translation or other coordinate transformation.

The calculation commands HARKER, EULER and POLAR reference the xyz coordinate as non-Cartesian. In these cases, the PDB format is nothing more than a format to input data to EDPDB.

The result of a calculation will be written to the standard output device (eg. the terminal in an interactive process) and/or to a scratch file (file_name.scr). Some result may overwrite the field(s) of related records, eg. ACCESS command will overwrite the W field of each ON atom with the solvent accessible area of that atom. Therefore, these calculation commands can be considered as editing commands as well.

Similarly, some calculation commands can also be considered as selection commands.


AB

Calculate the distance of every DIST pair defined by DFAB.

Function: Calculation, Selection, Editing

Syntax:
AB [(A, B) [(X, Y, Z)]]

Note:
1) If A or B is specified, the corresponding atoms, which satisfy the bond criterion defined with DFAB, will be selected and stored in (ie. overwrite) the group SCR.
2) Furthermore, if the X, Y or Z option is used, the corresponding field in the displayed text string will be overwritten with the A- B distance.

See also: ABC, ABCD, DFAB and LOAD

Examples:
1) Calculate the N-CA bonds in amino acid residues

      dfab n ca
      atom n ca
      ab
2) Calculate the CA-CA bonds between successive residues.
      dfab ca 0 1
      ca
      ab
3) List all the CB atoms which are within 3.0 Å from the carbonyl oxygen of the same residue.
      initial
      dfab cb o  ,,,,  0.0 3.0
      atom cb o
      ab a
      initial
      load scr
      list
4) Make a list of N-Ca, Ca-Cb, Ca-C distances, and store them in the x, y, z fields respectively.
      atom ca cb n c
      dfab n ca
      ab b x  ; store N-Ca to the x field of Ca
      dfab ca cb
      ab a y  ; store Ca-Cb to the y field of Ca
      dfab ca c
      ab a z      ; store Ca-C to the z field of Ca
      initial
      load scr
      list

ABC

Calculate angles using the angle group defined with the command DFABC.

Function: Calculation, Selection, Editing

Syntax:
ABC [(A, B, C) [(X, Y, Z)]]

Note:
1) If A, B or C is specified, the corresponding atoms which satisfy the angle criterion defined with DFABC will be selected and stored in (ie. overwrite) the group SCR.
2) Furthermore, if the X, Y or Z option is used, the corresponding field in the displayed text string will be overwritten with the A- B-C angle.

See also: AB, ABCD, DFABC and LOAD

Examples:
1) Calculate the N-CA-C angles in amino acid residues

      dfabc n ca c
      atom  n ca c
      abc
2) Calculate the CA-CA-CA angles in successive residues.
      dfabc ca 1 2 3
      ca
      abc
3) Calculate a hydrogen bond angle formed with C(residue 10) - O(residue 10) - HOH (solvent 200).
      dfabc c o hoh 10 10 200
      atom c o hoh from { zone 10 200 }
      abc

ABCD

Calculate torsion angles using the torsion angle group defined with the command DFABCD.

Function: Calculation, Selection, Editing

Syntax:
ABCD [(A, B, C, D}, [(X, Y, Z)]]

Note:
1) If A,B,C or D is specified, the corresponding atoms which satisfy the angle criterion defined with DFABCD will be selected and stored in (ie. overwrite) the group SCR.
2) Furthermore, if x,y or z option is used, the corresponding field in the displayed text string will be overwritten with the A-B-C- D torsion angle.

See also: AB, ABC, DFABCD and LOAD

Examples:
1) Calculate the N-CA-C-N (psi) angles in the peptide.

      dfabcd n ca c n 0 0 0 1
      atom   n ca c
      abcd
2) Calculate the CA-CA-CA-CA torsion angles in the peptide.
      dfabcd ca ca ca ca 1 2 3 4
      ca
      abcd
3) Check the chirality of each amino acid residue
      initial
      dfabcd ca n c cb
           ; define zeta angle
      atom ca n c cb
      abcd
           ; the zeta angle should be about 33.5 degrees.
4) List amino acid residues which have the alpha conformation, ie. -90.0 < phi < 0. and -90.0 < psi < 0.0 .
      ca
      blank
           ; erase the displayed text in ca records
      dfabcd c n ca c 0 1 1 1 f f t f -90. 0.0
           ; define phi torsion angle,
           ; limited between -90.0 and 0.0 degrees
      abcd c x
           ; store the torsion angle in x field of the third atom (ca)
      initial
      load scr
           ; select only the ca atoms of residues of
           ; -90.0 < phi < 0.0
      Dfabcd n ca c n 0 0 0 1 f t f f -90.0 0.0
           ; define psi torsion angle,
           ; limited between -90.0 and 0.0 degrees
      Abcd b y
           ; store the torsion angle in y field
           ; of the second atom (ca)
      initial
      load scr
           ; select only the ca atoms of residues
           ; that satisfy the double selection criteria
      list
           ; note that the x and y field are filled with
           ; phi and psi angles, and the z field is blank.

ACCESS

Calculate the solvent accessible area of each ON atom in the presence of other specified atoms (Ref. Lee & Richards. J. Mol. Biol. 55, 379-400, 1971).

Function: Calculation, Editing

Syntax:
ACCESS [grp_id] [r_probe] [zstep] [ISOLATED] [file_name]

Note:
1) grp_id is a group ID defined with command GROUP. If it is not specified, no background atoms will be considered. In other words, the default background is an empty group.
2) r_probe is the probe radius. The default is 1.4 Å.
3) zstep is the integration step size along z direction. The default is 0.2 Å .
4) If the option ISOLATED is used, the solvent accessible area of each ON atom will be evaluated in a context free of other ON atoms.
5) A database file in the current directory or in the default directory (ie. edp_data: for VMS, and edp_data/ for unix) is required to define VDW radii. A file in the current directory has higher priority than the file in the default directory. The default file name is the one previously specified, initially acc.dat. The acc.dat file can be used as a template to create user specific data files.
6) After the calculation, the occupancy of each ON atom will be replaced by the accessible area. If there is only one atom in the ON atom buffer, a list of accessible area vs. Z-section will be output in a Z-increasing order.

See also: FILE, SHAPE, SUMW and VOLUME

Examples:
1) Calculate the solvent accessible area (SAA) of an isolated residue, eg. residue 99.

      initial
      zone 99
      access
2) Calculate the SAA of molecule A (ie. chain A ) in the presence of molecule B (ie. chain B).
      initial
      group molB from { chain B}
      chain A
      access molB 1.4 0.2
3) Calculate the SAA of all the crystallographical located solvent molecule (residue type = SOL) to the bulk water, within the context of the protein molecule (say, zone 1 - 162), using a data file called my_acc.dat to assigning the Van de Waals radii. In this calculation, each solvent molecule should be calculated independently, without considering other solvent molecules. The individual SAA is stored in the W field of each ON atom.
      initial
      group prt from { zone 1 - 162 }
      residue sol
      access prt 1.4 0.2 isolated my_acc.dat

ANALYZE

Calculate the average, min., max., max-min, and sigma or rms of the displayed X,Y,Z coordinates, Occupancy and B values. The displayed XYZ are the coordinate fields shown on the screen with the LIST command that may be different from those stored in the x,y,z arrays for geometry calculations.

Function: Calculation

Syntax:
ANALYZE [ANGLE]

Note:
1) The definitions of sigma and rms are the following.

sigma(R) = sqrt(av((X-av(X))²+(Y-av(Y))²+(Z-av(Z))²))
sigma(B) = sqrt(av((B-av(B))²))
rms(R) = sqrt(av(X²+Y²+Z²))
rms(W) = sqrt(av(W²))
where av() stands for average, and sqrt() stands for square root.
2) If the ANGLE option is chosen, the x,y,z,w and b values will be considered as angles in degrees. All the angles are first converted into the region between -180 and 180 degrees before the statistics is done. The statistics for each field is done by shifting a 360 degree window to find the minimum sigma, so that eg. the average of -179.0 and 179.0 degrees would be 180.0 degrees, not 0.0 degree. (This option has bugs!)

See also: AVB, MOMENTINERTIA, RMSW and SUMW

Examples:
1) Calculate the statistics of backbone atoms

      Main
      Analyze
2) Count number of atoms of solvent molecules
      Residue SOL
      Analyze

AVB

Average the B value of the ON atoms over each residue, and overwrite the X, Y, Z or W fields of the CA atom with the average B.

Function: Calculation, Editing

Syntax:
AVB (X, Y, Z, W}

See also: ANALYZE, RMSW and SUMW

Examples:
1) In the following example, we will calculate the average B factor of each amino acid residue, of its main chain atoms and of its side chain atoms. The result will be stored in the x, y, z fields of the corresponding Ca record.

      Initial
      Ca
      Blank       ; clean the Ca x,y,z fields.
           ; This is particularly for the Gly residue which
           ; does not have side chain atoms
      Main
      Avb  y      ; store the main chain average B in the y column
      More
      Avb  x      ; store the residue average B in the x column
      Exclude Main
      Avb  z  ; store the side chain average B in the z column
      initial
      Ca
      List        ; display the statistic results
2) Select residues that have an average B larger than 40.0 A².
      more from { Ca }
           ; select the amino acid residues
      Avb w
           ; store the average B in the W column of Ca atom
      Initial
      W > 40.0 from { Ca }
           ; select the Ca atoms of W > 40.0
      More
           ; Expand the selection to residues

AXIS

Read a matrix file (eg. rtn.dat created with the command RTN), analyze the rotation translation of the matrix. Then, replace the W field of each ON atoms with the distance from the atom to the axis.

Function: calculation

Syntax:
AXIS file_name [vector_id, [axis_id]]

Note:
1) A matrix file is required to input the matrix to be analyzed.
2) If a vector_id is specified rotation axis will be stored as the vector. The vector will start at the point listed in the output of the AXIS command (ie. the point that the screw axis passes through). If specified, the vector may start from the y-z, z-x or x-y planes; the corresponding axis_id would be X,Y and Z.

See also: RTN and VECTOR

Examples:
1) Analyze the rotation-translation matrix in the file rtn.dat which is the default file name.

      axis rtn.dat
See also: the example on how to calculate a Hinge bending angle.


BRIDGE

Calculate the distance X-Y, the angle W-X-Y and the torsion angle W-X-Y-Z defined with the command DFBRG. This may be useful for studying a structural geometry between two atom groups (ie. the X and Y groups) which may be close in 3D space but not in the amino acid sequence.

Function: Calculation, Selection

Syntax:
BRIDGE [(W, X, Y, Z)]

Note:
The optional atom_id W, X, Y or Z, determines which atom in the bridge group is going to be stored in the SCR group.

See also: AB, ABC, ABCD and DFBRG

Examples:
1) Search for candidates of sites of engineered disulfide bridges. The search criterion is the following. The two residues should be 20 residues apart in the amino acid sequence. The Cb-Cb distance should be between 2.5 and 6.0 Å. One of the Ca-Cb-Cb angle should be between 80.0 and 180.0 degrees. (The Ca-Cb-Cb-Ca torsional angle is unrestricted).

      dfbrg ca cb cb ca x 0 y 0 t t t t 2.5 6.0 80 180 0 360 wxyz 20
      initial
      atom ca cb
      bridge

DIFF

Calculate the difference between the displayed (x, y, z, w, b) (multiplied by a scale factor) of the ON atoms and that of a given group. The difference is defined as
           value(group_atom) - value(ON_atom)*scale. 
The result is stored in the text string of the ON atoms. If an optional RMS is chosen, distance between the atom pair will be calculated and stored in the W column of the ON atom.

Syntax:
DIFF group_id [(SCALE [scale], RMS)]

Note:
1) The number of the ON atoms should be equal to the number of atoms in the specified group.
2) The default scale is 1.0.
3) Two consecutive DIFF operations, with default SCALE option, make the values of the ON records unchanged.

See also: ANALYZE and RATIO

Examples:
1) Calculate the coordinate shift between two sets of coordinates of the same molecule, say chains A and B.

      group moda from { chain a }
      group modb from { chain b }
      initial
      load moda
      diff modb rms
      analyze
2) Assume that two molecules A and B contact to each other in the crystal structure. List the buried solvent accessible area (SAA) of each atoms of molecule A.
      group mola from { chain a }
      group molb from { chain b }
      initial 
      load mola
      access 
           ; calculate the SAA of an isolated molecule A.
      write mola_acc.pdb
      close
      read  mola_acc.pdb c
      group tmp from { chain c }
      access molb
           ; calculate the SAA of molecule A 
           ; in the presence of molecule B
      diff tmp
           ; the W field will be the value of the SAA
           ; of molecule A buried by molecule B.

DISTANCE

Calculate the distances between the ON atoms and atoms of a given group.

Function: Calculation, Selection

Syntax:
DISTANCE group_id dmin dmax [skip_# max_output_#] [(LOAD, COPY] Note:
1) The group_id specifies a group of records; the distance between this group and the ON atoms will be calculated.
2) The dmin is the minimum distance criteria (0.0 < dmin), and the dmax is the maximum distance criteria (dmin < dmax).
3) The skip_# is the smallest residue number between two residues in the input-residue-sequence that will be included in the calculation ( 0 <= skip_# ). For example, skip_# = 4 indicates that only the atom pair which is 4 or more residues apart will be searched. Default is 1.
4) The max_output_# is the maximum number of output lines for the calculation. It is designed to prevent an unexpected long calculation. Default is the maximum number of atoms that the program allows.
5) If LOAD option is used, the atoms in the group satisfying the distance criteria will be stored in the SCR group.
6) If COPY option is used, the W field of the ON atom will be replaced by the W value of the last matched atom. Otherwise, the W field of each ON atom will be changed to the number of its neighbors counted in this calculation.
7) If the selection switch is currently set to OFF (ie. an EXCLUDE command is used), the atoms in the specified group that satisfy the distance criterion will be turned OFF during the calculation.

See also: AB, MMIG and NAYB

Examples:
1) Calculate 4.0 Å distance pairs between two zones, say zone 1 - 60 and zone 80 - 160.

      group tmp from { zone 80 - 160 }
      initial 
      zone 1 - 60
      distance tmp 0.0 4.0 0 2000
2) Select atoms which involve in the contact between zone 1 - 60 and zone 80 - 160.
      group tmp from { zone 1 - 60 }
      initial
      zone 80 - 160
      distance tmp 0.0 4.0 0 2000 load
      exclude w < 1.0
           ; keep contacting atoms in zone 80 - 160
      load scr
           ; select contacting atoms in zone 1 - 60
3) Assume there are two sets of water molecules (a1 - a100, b1 - b100), and they partially overlap. The following command will select unique water molecules only.
      initial
      zone a1 - a100 b1 - b100
      group wtr
      exclude distance wtr 0.0 0.5 1 200
           ; the duplicated water molecules will be turned OFF,
           ; only the first one in each cluster will be kept as ON.

EULER

Assuming the xyz are Eulerian angles (z,y',z"), the EULER command calculates the symmetry equivalent angles, and expresses them in either Eulerian or polar system. It is useful for understanding the rotation function solutions.

Function: Calculation

Syntax:
EULER TO_EULER
EULER TO_POLAR
EULER SYMMETRY symm_#
EULER MOVE_TO_O res_id, atom_name
EULER ASYMM [e1, e2, e3]

Note:
1) TO_EULER option converts the (z, y', z") angle into the standard range, ie. (-180.0 < z < 180.0, 0.0 < y' < 180.0, - 180.0 < z" < 180.0) .
2) TO_POLAR option converts (z, y', z") angle into polar angle. 3) If SYMMETRY option is used, the symm_# symmetry operator will be applied to the Eulerian angle before the standardization. Symmetry information is required for this operation.
4) MOVE_TO_O option applies the inverse rotation of the specified record to every ON records.
5) With ASYMM, the eulerian angles stored in the ON records will be converted to their symmetry mates which have the smallest rotation angles from the rotation specified by the eulerian angles (e1, e2, e3).

See also: ANALYZE, POLAR and SYMMETRY

Examples:
1) Convert the eulerian angles in the ON records to the standard range.

      euler to_euler
2) Convert the eulerian angles in the ON records to POLAR angles.
      euler to_polar
3) Convert the eulerian angles to one asymmetric unit.
      ... (input cell parameters)
      ... (input symmetry information)
      initial
      zone all
      euler asymm 0 0 0
4) Convert the eulerian angles in the ON records to their fourth symmetry mates.
      euler symmetry 4
5) Assume one has a set of rotation function peaks. If one of the peak (e.g. stored in residue 1, atom CA) was applied, where would the other peaks be?
      euler move_to_o 1 ca
      list

HARKER

Calculate the positions of Harker peaks, assuming the position of the atom(s) in real space is given by the records of the first (two) ON atom(s) in gridding or fractional coordinates. It is useful for checking heavy atom sites in MIR.

Function: Calculation

Syntax:
HARKER [grid_a, grid_b, grid_c] [symm_#1 [symm_#2]] [CROSS]

Note:
1) The grid_x is the grid number along the corresponding cell edge. The default is (1.0, 1.0, 1.0), ie. the coordinates are assumed to be fractional.
2) Symmetry information is required for this calculation. The symm_#1 and symm_#2 specify the Harker peak which are related by the two symmetry operators. The default symm_# goes through all of the symmetry operators.
3) If the CROSS option is specified, the position of cross peaks between the 1st and the 2nd atoms are calculated.

See also: SYMMETRY

Examples:
1) Assuming the coordinates in the selected record (zone 1) are fractional, calculate all the positions of its Harker peaks in fractional coordinates.

      cell 61.2 61.2 96.8 90.0 90.0 120. 1
      @symmetry p3221  ; for example
      initial
      zone 1 
      harker 1 1 1
2) The same assumption as above, calculate the position of the Harker peak between symmetry operators number 2 and number 5
      harker 1 1 1 2 5
3) Assuming the coordinates in the two selected records (zone 1 2) are in (100, 100, 100) gridding coordinates, calculate all the positions of their cross peaks with the same gridding.
      initial
      zone 1 2
      harker 100 100 100 , , cross

CLIQUE

Find matches between subsets of the ON atoms and subsets of atoms in a given group.

Function: Calculation

Syntax:
CLIQUE group_id min_clique rms_cutoff eps max_#_cliques

Note:
1) The min_clique is the minimum number of atomic matches for a clique to be listed. The rms_cutoff sets restriction of the rms coordinate difference for a clique to be listed. The eps sets criterion for a pair of distances to be considered as similar. The max_#_cliques sets limit to the output list. Only will the first few cliques be listed.
2) For a pair of atoms to match, the first characters of their atom name must be the same.
3) This calculation requires large arrays. To solve a real problem, the array dimension, max_l, which is stored in the file edp_dim.inc, may need to be modified.

Reference: H.M. Grindley et.al. J. Mol. Biol. (1993), 229, 707-721.

See also: BRIDGE and OVERLAY

Examples:
1) To find a similar residue arrangement to the Ser-His-Asp catalytic triangle.

      initial
      atom oh            from a1 ;a1 defined as the Ser
      atom nd1 ne2       from a2 ;a2 defined as the His
      atom od1 od2       from a3 ;a3 defined as the Asp
      group tri
      initial
      side from { residue ser his asp }
      clique tri 3 0.5 0.5 20
In the above example, cliques of at least 3 pairs of atomic matches are searched. The rms coordinate difference should be less than 0.5 Å and difference of bond length should be less than 0.5 Å too. The top 20 cliques will be listed.

CLOSER

Given two groups of atoms, CLOSER classifies the ON atoms according to the shortest distance to the atoms in each group.

Function: Calculation, Selection, Editing

Syntax:
CLOSER grp_id1 grp_id2 dmax

Note:
1) The grp_id1, and grp_id2 specify two groups. The two groups should not overlap with each other.
2) The dmax is the maximum distance criterion. Only the atoms that are within dmax distance from the first group will be considered in the calculation.
3) The occupancy of the ON atoms will be change in the following way. If the atom is closer to the first group than to the second group, its W column is set to the shortest distance. Otherwise, it is set to 999.0.
4) No crystallographic symmetry information is considered in this calculation.

See also: DISTANCE and MMIG

Examples:
1) For the protein molecule which has interdomain hinge bending motion, we need to assign the solvent molecules to different domains in order to superimpose the solvent molecules from different models. In the following, assume that the two domains are zone 1 - 75 and zone 76 - 162. The solvent molecules closer to the zone 1 - 75 will be selected.

      group n_dm from { zone 1 - 75 }
      group c_dm from { zone 76 - 162 }
      initial
      residue sol
      closer n_dm c_dm 3.5
      exclude w > 3.5

CORRELATION

Calculate the correlation between a given column of the ON atoms and a given column of a group.

Function: Calculation, Editing

Syntax:
CORRELATION grp_id (X,Y,Z,W,B) (X,Y,Z,W,B) [(X,Y,Z,W,B)]

Note:
1) The correlation between two sets of data, eg. W and B, is defined as

sum((w-av(w))*(b-av(b)) /
sqrt(sum((w-av(w))²)*sum((b-av(b))²)),
where sum() stands for a summation, av() stands for an average, and sqrt() stands for a square root.
2) The second and the third parameters specify the data columns of the ON atoms and the group, between which a correlation will be calculated.
3) As an optional result of this calculation, the last specified field, X, Y or Z, in the text string of the ON atom will be overwritten with the discrepancy W - (c1*B + c2), where c1 and c2 are determined by minimizing
sum((W - (c1*B + c2))²).

See also: DIFF and RATIO

Examples:
1) Calculate the correlation between the distance of each protein atoms to a hinge bending axis and the B factor. Assume that the hinge bending axis is stored as a matrix in a file called hinge.dat (see the examples of AXIS).

      initial 
      more from { ca }
      group tmp
      axis hinge.dat
           ; W column is replaced with the distance
           ; from each atom to the axis.
      correlation tmp w b 

JIGGLE

Introduce random errors to X, Y, Z, W or B values of the ON atoms, changing both the coordinates and the displayed text string.

Function: Calculation, Editing

Syntax:
JIGGLE (X, Y, Z, W, B) limit [shift]

Note:
1) X, Y, Z, W or B is the field to be jiggled. The limit is the jiggling amplitude. The shift is the amount of extra shift added to the value; the default shift is 0.0. As the result of this calculation, one has
new_value = old_value + random * limit + shift
where the random is a random number between -1.0 and 1.0.

Examples:
1) Introduce 1.5 Å random rms difference in the 3D coordinates of the ON atoms.

      jiggle x 1.5
      jiggle y 1.5
      jiggle z 1.5
2) Increase the B factor by 10.0.
      jiggle b 0.0 10.0

MATCH3D

MATCH3D performs three dimensional structure homology searches. This computer program is based on a modified version of Grindley's algorithm. The secondary structure of a protein molecule is represented as a set of vectors, each vector corresponding to one secondary structure element. The vector is calculated by finding the longest principle axis of the secondary structural element.

MATCH3D compares two structures at a time. In other words, two sets of secondary structure vectors are compared to search for structural homology. Each set of vectors may represent a protein molecule, a domain or a motif. Deletion and insertion do not affect the search. Secondary structure permutation is allowed on the user's request.

Usually, the secondary structures can be assigned by reading the output of the dssp program. A macro named dssp_w.edp can be used for this purpose.

Function: Calculation

Syntax:
MATCH3D grp_id min_clique_num max_rms file_name [NONSEQU]

Note:
1) MATCH3D vectorizes the structural fragments in the ON buffer and in the grp_id group. The vector is along the longest principle axis of the fragment. It is centered at the mass center of the fragment and have a length of the summation of the gyration radii along the other two principle axes. A vector is recogonized as a set of sequential records in the buffer which have the same W (occ) values. Different W values may represent different secondary structures. Only the vectors that have the same, non-zero W values will be matched with each other.
2) grp_id identify the target structure to be matched by ON atoms.
3) For the two structures to be homologous, there must exist at least min_clique_num of similar vector pairs between the them.
4) For two pairs of vectors to be similar, the rms coordinate deviation of their terminal points must be less than rms_max.
5) The rotation-translation matrix of the best solution is stored in a file named by file_name. The default file name is rtn.dat.
6) The NONSEQU option allows permutation among secondary structures. Otherwise sequential order is enforced in the alignment.
7) With different level of VERBOSE (0-6), match3d output different detailed results. For example, VERBOSE 2 lists the top two solutions if exist. VERBOSE 3 lists VERBOSE 2 output plus the detailed alignment of these two solutions. VERBOSE 4 lists all soltuions in addition to VERBOSE 3 output. And VERBOSE 5 gives the detailed alignment of all solutions.

Reference:
Grindley, H. M., et al. (1993). Identification of tertiary structure resemblance in proteins using a maximal common subgraph isomorphosim algorithm. J. Mol. Biol. 229, 707-721.
Kabsch, W. and Sander, C. (1983). Dictionary of Protein Secondary Structure: Pattern Recognition of Hydrogen_bonded and Geometrical Features. Biopolymers, Vol. 22, 2577-2637.

See also: OVERLAY and ALIGN3D.

Examples:
1) Find the rotation-translation which overlay 1crl to 1thg

	!$ edpdb 1crl.pdb a 1thg.pdb b
	! 3D structural homology search

        ! define secondary structures
        initialize
        ca
        setw 0.0
        @find_helices
        setw 1.0
        @find_strands
        setw 2.0

        ! overlay B to A based on secondary structure alignment
        initialize
        group a from { ca from { chain a}}
        group b from { ca from { chain b}}
        load b
        setenv verbose 2
        match3d a 4 4.0 rtn.dat

        ! apply the result to molecule b
        chain b
        rtn file rtn.dat

MMIG

Calculate crystal packing contacts between the ON atoms and atoms in a given group. MMIG stands for Molecular-Molecular- Interaction between two Groups of atoms.

Function: Calculation, Selection, Output

Syntax:
MMIG group_id distance [(LOAD, MOVE, PUNCH_ALL)] [inner_dist_cutoff]

Note:
1) The group_id specifies a group. This group of atoms are fixed, while the ON atoms moves according to the crystallographic symmetry, during the crystal packing contacts are searched.
2) distance is the distance criterion. Any pair of atoms, from the two groups, of a distance shorter than distance will be listed. To prevent unnecessary calculation, the criterion is limited so that 0.0 < dist < 7.0 Å. (If a distance larger than 7.0 Å is desirable, add a plus sign before the distance, eg. +8.0).
3) If the LOAD option is used, the atoms in the specified group that satisfy the distance criterion will be stored in the group named SCR.
4) If the MOVE option is used, the displayed x, y, z of the ON atoms will be replaced by the new coordinate at the position where the shortest distance is found. This option is useful to bring a water molecule close to the protein molecule. With this option, the W value of each ON atom will be replaced by the shortest distance.
5) Option PUNCH_ALL (or MOVE_ALL in v97a and older version) is similar to option MOVE, except new PDB records will be output to an opened PDB file for every positions of each ON atom that satisfy the distance criterion.
6) The inner_dist_cutoff is the minimum distance criterion. The default is 0.0.
7) The symmetry operator listed as the calculation result should be applied to the ON atoms to achieve the contacts.
8) If any ON atom is also included in the specified group, the calculation will not be performed for the unitary symmetry operator.

See also: DISTANCE, LOAD, MMI, MOVECENTER, RTN and SYMMETRY

Examples:
1) Calculate the crystal contacts between the molecule A and molecule B.

      group mola from { chain A }
      group molb from { chain B }
      initial
      load mola
      mmig mola 4.0      ; check A-A contacts 
      mmig molb 4.0      ; check A-B contacts
      initial
      load molb
      mmig molb 4.0      ; check B-B contacts
2) Move all the solvent molecules close to the protein molecule.
      group prt from { more from { ca }}
      initial 
      residue sol
      mmig prt 4.0 move
      write moved_sol.pdb

MOMENTINERTIA

Calculate the moments of inertia (in dalton Ų) of the ON atoms about the x, y and z axes, the principle axes of the inertia tensor, the radii of gyration (in Šunit) and the matrix which can take the principle axes to coincide with the x,y and z axes.

Function: Calculation

Syntax:
MOMENTINERTIA [file_name] [vector_id1] [vector_id2], [vector_id3]

Note:
1) The value of the W field in each record will be used as the mass for the corresponding atom in this calculation.
2) The current moments of inertia are calculated relative to the origin, while the principle axes of inertia tensor is calculated relative to the center of mass.
3) The file_name specifies the output file to store the matrix. The default file name is rtn.dat.
4) The vector_idn specifies a vector to store the unitary vector that starts from the center of mass and directs along each of the three principle axes of the molecule. The vector_idn is an text-string of upto four characters.

See also: RTN and VECTOR

Examples:
1) Calculate an approximate radii of gyration of the protein molecule along each principle axis.

      initial
      more from { ca }
      setw 1.0
           ; all atoms are evenly weighted
      momentinertia
2) Calculate the moments of inertia of the protein molecule.
      initial 
      atom c*
      setw 15.0   ; define mass for carbon groups
      initial
      atom n*
      setw 17.0   ; for nitrogen
      initial
      atom o*
      setw 19.0   ; for oxygen
      initial
      atom s*
      setw 36.0   ; for sulfur
      initial
      more from { ca }
           ; select the protein molecule
      momentinertia      
           ; calculate the principle axes of the inertia tensor
3) Assume that we have a long straight helix of 100 residues in an arbitrary orientation and position. The following command will bring the center of mass of that helix to the origin and align the helix axis along the Z axis.
      initial
      zone 1 - 100
      setw 1.0
      momentinertia rot_inertia.dat
      rtn file rot_inertia.dat
      momentinertia
           ; this 2nd momentinertia command will show that 
           ; the principle axes of the inertia tensor coincide
           ; with the xyz axes.

MOVECENTER

Calculate a transformation matrix that brings the geometric center of the ON atoms close to a specified fractional coordinate.

Function: Calculation

Syntax:
MOVECENTER [file_name] [fx1 fy1 fz1 [fx2 fy2 fz2]]

Note:
1) The file_name defines the file to store the matrix. The default file name is rtn.dat.
2) The fx1, fy1, fz1 are the fractional coordinates of the 1st point to which the geometric center of the ON atoms is expected to be close. If there are more than one symmetry operator which give the same distance, the 2nd point (fx2, fy2, fz2) provides the 2nd reference. The initial default of (fx1, fy1, fz1) is (0.5,0.5, 0.5). In general, the default of (fx1, fy1, fz1) is the center position determined in the previous run of MOVECENTER. The default of (fx2, fy2, fz2) is (0.0, 0.0, 0.0).
3) Cell parameters and symmetry operators are required.

Examples:
1) Assume there are two molecules per asymmetric unit. The following commands will bring the molecule A close to the center of the unit cell and bring the molecule B close to molecule A.

      initial 
      chain A
      movecenter rtn.dat
      rtn file rtn.dat
      initial
      chain B
      movecenter rtn.dat
      rtn file rtn.dat

MW

Calculate the molecular weight of a selected region of the structure. The basic unit of the structure is a residue. The standard molecular wieght of each residue type is defined in the 'pdbstd.dat' file.

Function: Calculation

Syntax:
MW

Examples:
1) Calcualte the molecular weight of chain A.

      initial 
      chain A
      mw

NEWXYZ

Calculate the coordinates of a new point.

Function: Calculation, Editing

Syntax:
NEWXYZ [(A, B, C)]

Note:
1) If no option is used, the new coordinates will be written to the currently opened output PDB file using the text string of the atom_a. The W field in the new record will be set to 0.0, and the B field will be set to 99.99.
2) The option A, B or C specifies whether the text string of atom_a, atom_b or atom_c will be replaced with the new coordinates.

See also: DFNEWXYZ

Examples:
1) Benzene
Let's start from the following pseudo PDB file, to build a benzene ring.

  ATOM      1  A0  UNK     1    0.000   0.000   0.000  1.00  1.00
  ATOM      2  A1  UNK     1    1.000   0.000   0.000  1.00  1.00
  ATOM      3  A2  UNK     1    0.000   1.000   0.000  1.00  1.00
  ATOM      4  A3  UNK     1    0.000   0.000   1.000  1.00  1.00
The 1st atom in the ring will be called C1, and located at (0.0, 0.0, 0.0).
      initial
      zone all
      write tmp.pdb
              ; create a temporary file to store intermediate coordinates
      setr bnz
              ; the residue name of the new records will be called bnz
      seti 2 1
              ; the residue ID of the new records will be set to 2
      seta c1
              ; the atom name of the first new records will be set to C1
      dfnewxyz a0 a1 a2 0 0 0 t t t 0.0 0.0 0.0
              ; describe the coordinates of the first record
      newxyz
              ; write the new record to the opened temporary 
              ; PDB file
      close
              ; close the temporary PDB file, so that it can be read 
      read tmp.pdb , initial
              ; read in the newly created/closed PDB file
              ; no chain name is reassigned
              ; overwrite the old coordinates
The 2nd atom in the ring will be called C2, and located along the x axis.
      initial
      zone all
      write tmp.pdb
      seta c2
      dfnewxyz c1 a1 a2 0 0 0 t t t 1.395 0.0 0.0
      newxyz
      close
      read tmp.pdb , initial
The 3rd atom in the ring will be called C3, and located on the x-y plane.
      initial
      zone all
      write tmp.pdb
      seta c3
      dfnewxyz c2 c1 a2 0 0 0 t t t 1.395 120.0 0.0
      newxyz
      close
      read tmp.pdb , initial
The 4th atom in the ring will be called C4, and C4-C3 is 1.395 Å, C4-C3-C2 is 120.0 degrees, and C4-C3-C2-C1 is 0.0 degree.
      initial
      zone 2
      write tmp.pdb
      seta c4
      dfnewxyz c3 c2 c1 0 0 0 t t t  1.395 120.0 0.0
      newxyz
      close
      read tmp.pdb , initial
The 5th atom in the ring will be called C5.
      initial
      zone 2
      write tmp.pdb
      seta c5
      dfnewxyz c4 c3 c2 0 0 0 t t t  1.395 120.0 0.0
      newxyz
      close
      read tmp.pdb , initial
And finally, the 6th atom in the ring will be called C6.
      initial
      zone 2
      write tmp.pdb
      seta c6
      dfnewxyz c5 c4 c3 0 0 0 t t t 1.395 120.0 0.0
      newxyz
      close
      read tmp.pdb , initial
      zone all
      list
2) Macro
This is a macro version of the Benzene example. Again let's start from the following PDB file, to build a benzene ring.
  ATOM      1  A0  UNK     1    0.000   0.000   0.000  1.00  1.00
  ATOM      2  A1  UNK     1    1.000   0.000   0.000  1.00  1.00
  ATOM      3  A2  UNK     1    0.000   1.000   0.000  1.00  1.00
The macro to be iteratively used is the following.
      ! new_xyz.edp
      initial
      zone all
      write tmp.pdb
      seta  $(p1)
      dfnewxyz $(p2)  $(p3)  $(p4)  ,,, ,,,  $(p5)  $(p6)  $(p7)
      newxyz
      close
      read tmp.pdb , initial
The following procedure creates the same model as the other example does, using the macro new_xyz.edp.
      @new_xyz c1 a0 a1 a2           0.0     0.0     0.0
      @new_xyz c2 c1 a1 a2         1.395     0.0     0.0
      @new_xyz c3 c2 c1 a2         1.395   120.0     0.0
      @new_xyz c4 c3 c2 c1         1.395   120.0     0.0
      @new_xyz c5 c4 c3 c2         1.395   120.0     0.0
      @new_xyz c6 c5 c4 c3         1.395   120.0     0.0
      atom c1 c2 c3 c4 c5 c6 from { zone 1 }
      setr bnz
      list

OVERLAY

Calculate the matrix which overlays the ON atoms to a given atom group, based on least-square minimization between the two sets of coordinates. (Mclachlan,1979. J. 128, 49-79.)

Function: Calculation

Syntax:
OVERLAY group_id [file_name] [WEIGHT]

Note:
1) The group_id specifies the target group to which the ON atoms will be superimposed. The number of atoms in the target group should be the same as the number of the ON atoms.
2) The file_name defines a file to store the superposition matrix. The default file name is rtn.dat.
3) If the WEIGHT option is used, the atoms will be weighted according to the values in the W (occupancy) field of the ON atoms.

See also: MATCH3D, RTN and SETW

Reference: A.D Mclachlan (1979). J. 128, 49-79.

Examples:
1) Overlay the Ca atoms of residue 1 - 20 of molecule A to the corresponding atoms in molecule B.

      group mola from { ca a1 - a20 }
      group molb from { ca b1 - b20 }
      initial
      load mola
      overlay molb rtn.dat
      rtn file rtn.dat
2) Overlay molecule A to molecule B based on the superposition of the residues 3 5 and 7 in chain A to the residues 303, 305 and 307 in chain B. The main chain atoms will be given three times weight as the side chain atoms.
      group tgt from { zone b303 b305 b307 }
      initial

      side a3 a5 a7
      setw 1.0
      initial
      main a3 a5 a7
      setw 3.0
      more
      overlay tgt rtn.dat
           ; calculate the matrix
      chain a
      rtn file rtn.dat
           ; apply the matrix
3) Determine the axis of a long helix, say residues 60 - 80
      group  a from { main 60 - 79 }
      group  b from { main 61 - 80 }
      load a
      overlay b rtn.dat
      initial
      axis rtn.dat

PLANAR

Calculate the least square plane of the ON atoms. The plane is represented by its normal vector. The vector starts from the geometric center of the atoms, which is on the plane by definition.

Function: Calculation

Syntax:
PLANAR vector_id

Note:
1) At least three non co-linear atoms are required.
2) The normal vector is specified with vector_id which is an text-string of upto four characters. For example, it may be one of the V0, V1, ... V9.

See also: VECTOR

Examples:
1) Check the planarity of a Phe side chain, say residue 4

      initial
      side 4
      planar v0
2) Calculate the angle between the rings of two Phe side chains, say residues 4 and 67.
      initial
      atom cg cd1 cd2 ce1 ce2 cz from { zone 4 }
      planar v1
           ; define v1 as the normal of the ring of residue 4
      initial
      atom cg cd1 cd2 ce1 ce2 cz from { zone 67 }
      planar v2
           ; define v2 as the normal of the ring of residue 67
      vector vv v1 v2
           ; calculate the angle

POLAR

Assuming the xyz are polar angles (phi, omega, kappa), this command calculates the symmetry equivalent angles, and expresses them in either an Eulerian or a polar system. It is useful for understanding the rotation function solutions. The convention for the polar angle system is that phi is the angle between the x axis and the projection of the rotation axis on the x-y plane; omega is the angle between the rotation axis and the z axis; and kappa is the rotation angle about the rotation axis.

Function: Calculation

Syntax:
POLAR TO_POLAR
POLAR TO_EULER
POLAR SYMMETRY symm_#
POLAR MOVE_TO_O res_id, atom_name
POLAR ASYMM [p1, p2, p3]
POLAR SRF_RED [p1, p2, p3]
POLAR UNIQUE delta_angle

Note:
1) TO_POLAR option convert the (phi, omega, kappa) angle into the standard range, ie. (0.0 < phi < 180.0, 0.0 < omega < 180.0, -180.0 < kappa < 180.0).
2) TO_EULER option converts (z, y', z") angle into eulerian angle.
3) If SYMMETRY option is used, the symm_# symmetry operator will be applied to the polar angle before the standardization. Symmetry information is required for this operation.
4) MOVE_TO_O option applies the inverse rotation of the specified record to every ON records.
5) With the ASYMM option , the polar angles stored in the ON records will be converted to their symmetry mates which have the smallest rotation angles from the rotation specified by the polar angles (p1, p2, p3).
6) With the SRF_RED option, the polar angles stored in the ON records will be considered as self-rotation function solutions and converted to their symmetry mates which have the smallest rotation angles from the rotation specified by the polar angles (p1, p2, p3).
7) With the UNIQUE option, a record that different from a previous one by an angle smaller than the delta_angle will be turned off.

See also: AXIS, ANALYZE, EULER and SYMMETRY

Examples:
1) Convert the polar angles in the ON records to the standard range.

      polar to_polar
2) Convert the polar angles in the ON records to eulerian angles.
      polar to_euler
3) Convert the polar angles to one asymmetric unit.
      ... (input cell parameters)
      ... (input symmetry information)
      initial
      zone all
      polar asymm 0 0 0
4) Convert the polar angles in the ON records to their fourth symmetry mates.
      polar symmetry 4
5) Assume one has a set of rotation function peaks. If one of the peak (e.g. stored in residue 1, atom CA) was applied, where would the other peaks be?
      polar move_to_o 1 ca
      list

RATIO

Calculate the ratio between the displayed (x, y, z, w, b) (multiplied by a scale factor) of the ON atoms and that of a given group. The ratio is defined as value(group_atom) divided by value(ON_atom)*scale. The result is stored in the text string of the ON atoms as well as the W an B fields. If the value of the ON atom is about 0.0 (less than 0.005), the corresponding result is set to a default value. If there is any other error, the W field of the corresponding ON atom is set to the default value. BE CAREFUL!

function: Calculation

Syntax:
RATIO group_id [scale] [def_value]

Note:
1) The number of the ON atoms should be equal to the number of atoms in the specified group.
2) The default scale is 1.0. The default def_value is 999.99.

See also: ANALYZE and DIFF

Examples:
1) Assume that we have two models of the same peptide chain. One is a folded model, say chain A. The other is an extended model, say chain B. The following example calculates the ratio of the solvent accessible area (SAA) of the folded model relative to the extended model for each amino acid residue.

      group mola from { chain a }
      group molb from { chain b }
      initial 
      load mola
      access 
      sumw b
           ; the B field of the CA has been change to 
           ; SAA of the residue of the folded model
      initial
      load molb
      access
      sumw b
           ; the B field of the CA has been change to 
           ; SAA of the residue of the extended model
      initial
      group a from { ca from mola }
      group b from { ca from molb }
      load b
      sett 24 31 ' 1.0'  ; set the x field to 1.0 
      sett 31 38 ' 1.0'  ; set the y field to 1.0
      sett 39 47 ' 1.0'  ; set the z field to 1.0
      setw  1.0          ; set the w field to 1.0
      ratio a 1.0 999.99
      list 
           ; the B field is the ratio, ie. the fractional SAA.

RMSW

Calculate the rms of the W value of the ON atoms over each residue, and overwrite the X, Y, Z or B of the CA atom with this calculated rms(W). It can be used for calculating the rms shift of coordinates of each residue.

Function: Calculation

Syntax:
RMSW (X, Y, Z, B}

Note:
1) The definition of rms of W is that rms(W) = sqrt(av(W²)).
2) The X, Y, Z or B is used to specify the field in the CA atom where the result for each residue will be written.

See also: ANALYZE, AVB, DFCA, DIFF and SUMW

Examples:
1) Calculate the coordinate difference between two models (say A and B) of the same protein molecule.

      group a from { chain a }
      group b from { chain b }
      initial
      load a
      diff b rms
           ; the W field of each atom is changed to 
           ; the coordinate shift. 
      rmsw b
           ; the B field of the CA atom is changed to 
           ; the rms shift of the residue.
      initial
      ca from a
      list

RTN

Perform coordinate transform to the ON atoms. RTN changes both the coordinate and the displayed text string.

Function: Calculation, Editing

Syntax:
RTN main_option (parameters) [(SAVE, MULT, INVE) [file_name(s)]]

Note:
1) One has three options to manipulate the currently used matrix and to store it in a matrix (ASCII) file specified with file_name. The default file name is rtn.dat.

SAVE -- save it as a rtn.dat file; overwrite the old file if exists.
MULT -- left-multiply the matrix to an existing matrix in the matrix file, store the product matrix in another file.
INVE -- calculate the inverse matrix of the currently used matrix, save it in the matrix file.
2) To use these three options, all parameters required by the main_option need to be specified.

Available main_options are ABCD , AXIS , CENTER , DEORTH , EZXZ , EZYZ , FILE , MATCH , MATRIX , ORTHOG , OVERLAY , POLAR , SYMMETRY and V_ALIGN .


ABCD

Reset a torsion angle, which is defined with four atoms, by predictively moving the 4th atom. Useful for resetting side chain rotamers.

Syntax:
RTN ABCD res_a [atom_a] res_b [atom_b] res_c [atom_c] res_d [atom_d] torsion_angle

Note:
The default atom name for each specified residue is the first atom of the residue, and should be called using a comma.

See also: AXIS option and ABCD command

Examples:
1) Set the chi-I torsion angle of residue 4 to -176.0 degrees, regardless what the current values is.

      initial
      side 4
      rtn abcd 4 n 4 ca 4 cb 4 cg -176.0
           ; since the side chain atoms including the CG 
           ; have been rotated, if the same command is repeated,
           ; it will produce zero rotation-translation.
      rtn abcd 4 n 4 ca 4 cb 4 cg -176.0
2) Set both the chi-II and chi-III torsion angles of Methionine residue 1 to -60.0 degrees.
      initial 
      side 1
           ; select atoms CB CG SD and CE
      rtn abcd 1 ca 1 cb 1 cg 1 sd -60.0
      exclude atom cb cg sd
           ; only the CE atom need to move
      rtn abcd 1 cb 1 cg 1 sd 1 ce -60.0

AXIS

Rotate about a two-atom bond, plus a translation parallel to the rotation axis.

Syntax:
RTN AXIS vector_id rotation_angle [translation]

Note:
1) The vector_id defines the axis of the rotation. The "right-hand convention" (ie. looking down and counterclockwise) is used to determine the direction of the rotation.
2) The default translation along the rotation axis is 0.0.

See also: ABCD option and VECTOR BY_ATOM command

Examples:
1) Rotate side chain chi-I angle (N-CA-CB-CG) of residue 4, by (- 120.0) degrees.

	initial
	side 4
	vector by_atom cacb 4 ca 4 cb
	rtn axis cacb -120.0, 0.0
2) Rotate the whole protein molecule by 90.0 degrees about an axis which passes through the Ca atom of residue 55 and the Ca atom of residue 127, and translated by 5.0 Å.
	initial
	more from { ca }	; select the protein molecule
	vector by_atom v1 55 ca 127 ca
	rtn axis v1 90.0 5.0

CENTER

Translate the ON atoms so that the geometric center of the ON atoms is at the origin (0, 0, 0).

Function: Calculation

Syntax:
RTN CENTER

Note:
The geometric center is calculated only based on the
currently selected atoms.

See also: MOMENTINERTIA

Examples:
1) Set the geometric center of the ON atoms to the origin.

      rtn center
2) Rotate the molecule by a rotation of (10.0, 20.0 30.0) in polar angles at the geometric center of the currently selected model.
      rtn center inve
           ; move the geometric center to the origin
           ; and save the inverse translation matrix 
      rtn polar 10.0 20.0 30.0 
           ; perform the rotation
      rtn file rtn.dat
           ; move back to the original coordinate frame.

DEORTH

De-orthogonalize the coordinates, changing them from a Cartesian system to a crystal gridding system or a fractional coordinate system.

Syntax:
RTN DEORTH grid_a grid_b grid_c

Note:
1) The convention of the alignment of the (xyz) Cartesian system relative to the (abc) crystallographic axes is read in from the header of the (1st) input PDB file or is defined with a CELL command.
2) The grid_a, grid_b and grid_c are the grids of the unit cell along the crystallographic a, b and c axes.

See also: ORTHOG option and CELL command

Examples:
1) Convert the coordinates of the ON atoms from Cartesian coordinates to crystallographic fractional coordinates.

      rtn deorth 1.0  1.0  1.0
2) Assume that the current coordinate is in Cartesian system. We are going to apply a translation (10.0, 20.0, 30.0) to the ON atoms in a gridding system of (grid_a, grid_b, grid_c) = (60, 60, 100).
      rtn deorth 60 60 100
           ; convert the ON atoms to gridding 
      rtn ezxz   0.0 0.0 0.0 10.0 20.0 30.0
           ; apply a zero rotation and 
           ; a (10.0, 20.0, 30.0) translation
      rtn orthog 60 60 100
           ; convert the ON atoms back to the Cartesian system

EZXZ

Perform a rotation defined with a (zx'z") eulerian angle, plus some translation specified in the Cartesian coordinate.

Syntax:
RTN EZXZ e1 e2 e3 [t1 t2 t3]

Note:
1) The operation order is: a) rotating the object (not the coordinate frame) by e3 (degrees) about the Z axis; b) rotating the object by e2 (degrees) about the X axis; c) rotating the object by e1 (degrees) about Z axis; d) translating the object by (t1, t2, t3) if specified.
2) The default (t1, t2, t3) is (0.0, 0.0, 0.0).

See also: EZYZ and POLAR options as well as AXIS command

Examples:
1) To rotate the ON atoms about X axis by 30.0 degrees.

      rtn ezxz 0.0 30.0 0.0
2) To rotate the ON atoms first about the X axis by 1.0 degree and then about the Y axis by 2.0 degrees and then about the Z axis by 3.0 degrees.
      rtn ezxz 0.0 1.0 0.0
           ; first 1.0 degree about X
      rtn ezyz 3.0 2.0 0.0   
           ; then  2.0 degrees about y and 3.0 degrees about z

EZYZ

Perform a rotation defined with a (zy'z") eulerian angle, plus some translation specified in the Cartesian coordinate.

Syntax:
RTN EZYZ e1 e2 e3 [t1 t2 t3]

Note:
1) The operation order is: a) rotating the object (not the coordinate frame) by e3 (degrees) about the Z axis; b) rotating the object by e2 (degrees) about the Y axis; c) rotating the object by e1 (degrees) about Z axis; d) translating the object by (t1, t2, t3) if specified.
2) The default (t1, t2, t3) is (0.0, 0.0, 0.0).

See also: EZXZ and POLAR options as well as AXIS command

Examples:
1) To rotate the ON atoms about Y axis by 30.0 degrees.

      rtn ezyz 0.0 30.0 0.0
2) To rotate the ON atoms first about the X axis by 1.0 degree and then about the Y axis by 2.0 degrees and then about the Z axis by 3.0 degrees.
      rtn ezxz 0.0 1.0 0.0
           ; first 1.0 degree about X
      rtn ezyz 3.0 2.0 0.0   
           ; then  2.0 degrees about y and 3.0 degrees about z

FILE

Read a matrix from an existing matrix file, and apply it to the ON atoms.

Syntax:
RTN FILE file_name

Note:
1) The data in a matrix file should have free format, ie. are separated from each other with space or . The order of the data is the following: r11, r12, r13, r21, ...r32, r33, t1, t2, t3. The matrix is used as

           x'= r11*x + r12*y + r13*z +t1
           y'= r21*x + r22*y + r23*z +t2
           z'= r31*x + r32*y + r33*z +t3
where (x, y, z) stands for old coordinate, and (x', y', z') stands for the new coordinate.
2) The default file name, specified with a comma (,), is rtn.dat.

See also: MOMENTINERTIA, MOVECENTER and OVERLAY

Examples:
1) To apply the transformation matrix in a file rtn.dat to the Ca atoms.

      initial
      Ca
      rtn file rtn.dat
2) To apply the inverse matrix of the matrix in the rtn.dat file to the Ca atoms.
      initial
      rtn file rtn.dat  inve inverse_matrix.dat
           ; create a file of the inverse matrix
      Ca
      rtn file inverse_matrix.dat
3) Matrix multiplication. Assume that one has two coordinate transformations, A and B, stored in files a.dat and b.dat. The following commands create another file to contain the combination transformation AB.
      initial
      rtn file b.dat save b.dat
      rtn file a.dat mult b.dat ab.dat 

MATCH

Match two atoms by performing a given POLAR rotation, eg. to apply a non-crystallographic symmetry. The two atoms may represent two heavy atom sites binding to two protein molecules and the rotation may be a non-crystallographic rotation obtained from a self rotation function search.

Syntax:
RTN MATCH res_id1 [atom_1] res_id2 [atom_2] phi omega kappa

Note:
1) The res_id1 and atom_1 specify the residue ID and atom name of the 1st atom; and the res_id2, atom_2 for the 2nd. The default atom name for each specified residue is the first atom of the residue.
2) The polar angle (phi, omega, kappa) specifies the rotation.
3) The vector connecting the two atoms should not be parallel to the rotation axis.

See also: POLAR option

Examples:
1) To match the Ca of residue A1 to the Ca of residue B1 by a 72 degree rotation about an axis parallel to the X axis.

      rtn match A1 Ca B1 Ca 0.0 90.0 72.0

MATRIX

Read a matrix from the input line, and apply it to the ON atoms.

Syntax:
RTN MATRIX r11, r12, r13, r21, ...r32, r33, t1, t2, t3

Note:
1) The matrix is used as

           x'= r11*x + r12*y + r13*z +t1
           y'= r21*x + r22*y + r23*z +t2
           z'= r31*x + r32*y + r33*z +t3
where (x, y, z) stands for old coordinate, and (x', y', z') stands for the new coordinate.

See also: the FILE option

Examples:
1) Rotate the coordinates by 180 degrees about Z.

      initial
      zone all
      rtn matrix -1 0 0, 0 -1 0, 0 0 1, 0 0 0
2) Fix a chirality problem of a given residue (eg. residue 164) by changing the position of Ca to its mirror position.
      initial
      ca 164
      rtn over $(p1) n c cb 0 0 0 , ,,, ,,, inv tmp.dat
           ; the mirror is defined by the N, CB and C atoms
           ; first move the mirror to the y-z plane
      rtn matrix -1 0 0 0 1 0 0 0 1 0 0 0
           ; set x:=-x
      rtn file tmp.dat
           ; move the mirror plane back

ORTHOG

Orthogonalize the coordinates of the ON atoms, changing them from a crystal gridding system, including the fractional coordinate system, to a Cartesian system.

Syntax:
RTN ORTHOG grid_a grid_b grid_c

Note:
1) The convention of the alignment of the (xyz) Cartesian system relative to the (abc) crystallographic axes is read in from the header of the (1st) input PDB file or is defined with a CELL command.
2) The grid_a, grid_b and grid_c are the grids of the unit cell along the crystallographic a, b and c axes.

See also: DEORTH option and CELL command

Examples:
1) Convert the coordinates of the ON atoms from the crystallographic fractional coordinates to Cartesian coordinates.

      rtn deorth 1. 1. 1.
2) Assume that the current coordinate is in a Cartesian system of an alignment of x//a*, y//b, z//(a* X b) (convention #1), and that we want to convert the coordinate to a Cartesian system of an alignment of x//a, y//b*, z//(a X b*) (convention# 6).
      cell  61.2 61.2 96.8 90.0 90.0 120.0 1
      rtn  deorth 1.0 1.0 1.0
           ; convert to fractional coordinates, 
           ; assuming convention #1
      cell  61.2 61.2 96.8 90.0 90.0 120.0 6
      rtn  orthog 1.0 1.0 1.0
           ; convert back to Cartesian coordinates,
           ; assuming the new convention, #6

OVERLAY

Perform a three-atom to three-atom superposition, useful for making a model mutation.

Syntax:
RTN OVERLAY res_id1 [atom_11 atom_12 atom_13] [reg_11 reg_12 reg_13] [res_id2 [atom_21 atom_22 atom_23] [reg_21 reg_22 reg_23]]

Note:
1) The rotation-translation matrix is calculated from two groups of coordinates. Each group contains three atoms. The first atom of the first group will be translated to the position of the first atom of the second group. The second atom of the first group will be aligned so that the two vectors from the first atom to the second atom of the two groups are co-linear. The third atom of the first group is aligned so that the six atoms of the two groups are co-planar.
2) The res_idn is the residue ID of the corresponding group It is the registration zero for the group. The atom_nn is the atom names of the 1st, 2nd and 3rd atoms in the corresponding groups. The default atom_11, atom_12 and atom_13 are CA N C. The default atom_21, atom_22 and atom_23 are the same as atom_11, atom_12 and atom_13, if res_id2 has been specified. The reg_nn is the registration number relative to the res_idn for the corresponding atom_nn, so that, eg. atom_11, atom_12 and atom_13 do not have to be in the same residue. The default reg_nn is 0.
3) In case that res_id2 is not specified, the default coordinate of the second group is ((0.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, 1.0, 0.0)}, so that the transformation will bring the first atom in the first group to the origin, the second atom on Z axis, and third atom on y-z plane.

See also: the V_ALIGN option and OVERLAY command

Examples:
1) Rotate-translate the side chain of residue A100 by overlaying its backbone atoms to that of residue B100.

      initial
      side a100
      rtn overlay a100  ,,,  ,,,  b100  ,,,  ,,,
2) Assume we want to make a model of Met to Ile substitution at position 6. A library PDB file that contains a standard building block of Ile is required, in which the Ile model that we want to use is called I1, for example. The following commands will create a new PDB file called m6i_model.pdb. It will contain the wild type coordinates except at position 6, where the Met will be changed to an Ile.
      initial
      zone first - 5
      write m6i_model.pdb
      initial
      zone i1
      rtn overlay i1  ,,,  ,,,  6 ,,, ,,,
           ; overlay the Ile block (ie. I1) to the residue 6
      seti 6 1
           ; rename the Ile block as residue 6
      append
      initial
      zone 7 - last
      append      
      close

POLAR

Perform a rotation defined with a polar angle, plus some translation specified in the Cartesian coordinate.

Syntax:
RTN POLAR phi omega kappa [t1 t2 t3]

Note:
1) The phi is the angle between the x axis and the projection of the rotation axis on the x-y plane; omega is the angle between the rotation axis and the z axis; and kappa is the rotation angle about the rotation axis.
2) The default translation vector, (t1, t2, t3), is (0.0, 0.0, 0.0).

See also: EZXZ and EZYZ options as well as AXIS command

Examples:
1) To rotate the ON atoms about Y axis by 30.0 degrees.

      rtn polar 90.0 90.0 30.0
2) To rotate the ON atoms with a polar rotation (10.0, 20.0, 30.0) at the geometric center of the molecule, followed by a translation of (40.0 50.0, 60.0).
      zone all
      rtn center inve
           ; bring the molecule to a coordinate system 
           ; in which the geometric center is at the origin and 
           ; the xyz axes are parallel to the original ones;
           ; save the inverse matrix
      rtn polar 10.0 20.0 30.0 40.0 50.0 60.0
           ; perform the rotation-translation
      rtn file rtn.dat
           ; bring the molecule back the original 
           ; coordinate system

SYMMETRY

Apply a symmetry operator, plus an optional crystallographic translation, to the ON atoms. The ON atoms can be treated either as a rigid body or as individuals.

Syntax:
RTN SYMMETRY [symm_#] [fx fy fz]

Note:
1) The default symm_# is 0. The default fractional coordinate, (fx, fy, fz) is (0.0, 0.0, 0.0).
2) If the symm_# equals 0, atoms will be transformed individually into a box of one unit cell centered at (fx, fy, fz).
3) If the symm_# is greater than zero, the corresponding symmetry operator in the symmetry operator list will be applied followed by a translation specified with the fractional coordinate (fx, fy, fz).
4) If the symm_# is negative, the inverse matrix of the corresponding (positive) symmetry operator will be applied, *followed* by a translation specified with the fractional coordinate (fx, fy, fz).

See also: MMIG, MOVECENTER and SYMMETRY

Examples:
1) Apply the second symmetry operator (see SYMMETRY command), plus a translation along crystallographic C axis by one unit cell, to the ON atoms.

      rtn symmetry 2 0 0 1
2) Transfer the ON atoms by half unit cell along each crystallographic axis. let's assume the first symmetry operator in the symmetry operator list is the unitary operator (ie. X, Y, Z)
      rtn symmetry 1 0.5 0.5 0.5
3) Transfer the ON atoms into a box of a unit cell centered at the (0.5, 0.5, 0.5) in fraction coordinate.
      rtn symmetry 0 0.5 0.5 0.5
4) Assume that there is one protein molecule per asymmetric unit. The residue 45 has a crystal contact with residue 116 through some crystallographic symmetry operator (to be determined). In the following, a coordinate file of the protein molecule will be created, in which residue 116 will contact the residue 45 of the original model.
      ...  
           ; input the cell parameters and the symmetry operators
      initial
      group r_45 from { zone 45 }
      zone 116
      mmig r_45 4.0
           ; In the output of this command, 
           ; we find the message:
           ; symm.# 3: y-x, -x, z+1/3 plus [ 1, 1, 0] 
      zone all
      rtn symmetry 3 1 1 0
           ; apply the third symmetry operator
           ; plus (1,1,0) translation.
      write new_model.pdb
           ; output the rotated-translated model to a PDB file.

V_ALIGN

Given two vectors, perform a rotation-translation such that the first vector will start at the origin and end on the positive z axis and the second vector will lie on a plane parallel to the y-z one.

Syntax:
RTN V_ALIGN vector_id1 vector_id1

See also: the OVERLAY option and VECTOR command

Examples:
1) align the protein molecule such that its shortest axis becomes parallel to z axis.

	initial
	more from {ca}
	momentinertia    ,  long med sht
	rtn v_align  sht med

SHAPE

Generate random probes around a cavity or a cleft. The position of a probe will be chosen such that there is no overlap between the Van de Waals sphere of the probe and that of the ON atoms. The collection of these probes provides approximate information about the shape, volume and surface area of the cavity or cleft.

Function: Calculation

Syntax:
SHAPE search_radius res_id [atom_name] max_RT [probe_radius] [file_name] [random_seed]

Note:
1) Given a search background and a search center, SHAPE command will randomly generate probes within a sphere, check whether there is any bad contact between the probe and the background, and write out the legal probes.
2) The ON atoms will be used as the search background. An atom specified with the res_id and atom_name will serve as the search center. The default atom is first atom of the specified residue. Max_RT number of random probes will be generated within a sphere of the search_radius.
3) A legal probe is a probe which does not have any bad contact with the background atoms based on the Van der Waals radius of the ON atom and the probe_radius. The default probe_radius is 1.4 Å. The search will start around the center atom in a sphere of a radius about twice the summation of the probe radius and the maximum Van der Waals radius of the ON atoms. In each step, a new probe will be generated around the previously determined legal probe.
4) The legal probes will be written to the currently opened output PDB file. The text string of the output records will be copied from that of the center atom. However, the coordinates will be replaced with that of the probe position, and the B factor of the record is replaced by the B factor of the nearest ON atom. Its W field is set to zero.
5) The random_seed is an integer; if the result is expected to be repeatable, the random_seed should be given explicitly. The default value is a random number.
6) A database file (specified with the file_name) in the current directory or in the default directory is required to define the VDW radii of the ON atoms. (See ACCESS command documentation for more details).
7) Since the calculation is based on random number generator, and for small cavity the result is very likely to be sensitive to the starting position of the search, verification of the result by repeated calculations and/or graphic display is strongly recommended.

See also: ACCESS, FILE and VOLUME

Examples:
1) Generate random probes which mimic the shape of a cavity in the carboxy terminal domain of T4 lysozyme (pdb4lzm.pdb). In the following example, the search center is read from a separated PDB file, center.pdb, which contain one record.

  ATOM      1  PRB SOL C   1   28.800  10.300  0.600  1.00  1.00
The following macro may be repeated a few times to verify the result.
      reset
      read center.pdb
      write prb.pdb
           ; open a PDB file to output the legal probes
      nayb 10.0 c1 prb from { zone 1 - 162 }
           ; select the background atoms form the protein molecule
      shape 6.0 c1 prb 3000 
           ; 6.0 search radius, 3000 tries
      close
      read prb.pdb , initial
      zone all
      volume      
           ; calculate the volume of the cluster of the probes.
           ; If the number of probes generated is large, this volume 
           ; should be very close to the true result of the model.

SORT

Reset the order of the output records.

function: Calculation, Selection

Syntax:
SORT [option]

Note:
1) The option is one of the following

a) B -- sort by B value in an ascending order
b) -B -- sort by -B value in a descending order
c) W -- sort by W value in an ascending order
d) -W -- sort by -W value in a descending order. (See also: SETW)
e) DFRES -- sort by DFRES definitions (default from edp_data:pdbstd.dat), check the side chain chirality and labelling, and set the status of the okay atoms to ON. (See also: DFRES)
f) SWAP -- swap the ON atoms with the atoms in a given group as well as their output order. (See also: SWAP)
g) LOAD -- sort by groups in a given loading order. (See also: GROUP)
h) blank -- set to the original order.
2) The sort command with options (W,-W,B and -B) will work on ON atoms only. The DFRES option will change the status of the atoms if proper.

Examples:
1) Sort the records by the B factor in an ascending order.

      sort B
2) Sort the records by the W value in a descending order.
      sort -W
3) Reset the records to the original order.
      sort
4) Fix the labelling problem
      initial
      sort dfres
5) Switch the output order of chain A and chain C, assuming the input order is chains A, B and C.
      group molc from { chain c }
      initial
      chain a
      sort swap molc
           ; The new order is that chain A is after chain B
           ; and chain C is before chain B. 
      chain a b c
      write cba.pdb
6) Set the output order to chains C, and B and A.
      group mola from { chain a }
      group molb from { chain b }
      group molc from { chain c }
      sort load c b a
           ; The new order is that chain A follows chain B
           ; and chain B follows chain C.
           ; Note that this sort command does not select any records.
           ; Also if there is any records other than chains a, b 
           ; and c, they will locate after the records of chain a.
      initial
      zone all
      write cba.pdb

SUMW

Calculate the summation of the W value of the ON atoms over each residue, and overwrite the X, Y, Z or B of the CA atom with this summation.

Function: Calculation

Syntax:
SUMW (X, Y, Z, B}

Note:
The X, Y, Z or B is used to specify the field in the CA atom where the result for each residue will be written.

See also: AVB, DFCA and RMSW

Examples:
1) Calculate the solvent accessible area of each residue.

      initial
      ca
      blank   ; clean the CA text string
      more    ; select the protein molecule 
      access
      sumw x  
           ; store the summation of each residue to the x field
      exclude main
      sumw z 
           ; store the summation over side chain atoms to the z field
      initial
      main
           ; store the summation over main chain atoms to the y field
      initial
      ca
      list

VECTOR

Function: Calculation, Information

Syntax:
VECTOR main_option parameter(s)

Available main_options are BY_ATOM, BY_NUM , DELETE , LIST , PV , VP and VV

See also: maximum number of vectors


BY_ATOM

Define a new vector using two atoms.

Syntax:
VECTOR BY_ATOM res_id1 [atom_id1] res_id2 [atom_id2]

Note:
1) res_id1 and atom_id1 specify the first atom, ie. the starting point of the vector; and res_id2 and atom_id2 specify the second atom, ie. the end point of the vector. 2) the default atom is the first atom in the specified residue.

Examples:
1) create a vector passing through CA atom of residue 10., and CA atom of residue 30.

	vector by_atom  v1 10 ca 30 ca
2) rotation the side chain of residue 4 about the CA-CB bond by -120.0 degrees.
	initial
	side 4
	vector by_atom v1 4 ca 4 cb 
	rtn axis v1  -120.0  0.0 

BY_NUM

Create a new vector using numbers.

Syntax:
VECTOR BY_NUM vector_id p1, p2, p3, r1, r2, r3, [length]

Note:
1) p1, p2, p3 are the x, y, z coordinates of the starting point of the vector.
2) if r1²+r2²+r3² = 1.0 and length is not zero, r1, r2, r3 are taken as the directional cosine of the vector. Otherwise, they are taken as the x, y, z coordinates of the end point of the vector.

Examples:
1) create a vector along z axis, of length 2.

	vector by_num v1 0 0 0, 0 0 1,  2
  or 
	vector by_num v1 0 0 0, 0 0 2

DELETE

Delete an existing vector.

Syntax:
VECTOR DELETE vector_id

Examples:
1) delete vector v1.

	vector delete v1

LIST

List the current vector(s).

Syntax:
VECTOR LIST [vector_id]

Examples:
1) list all the current vectors.

	vector list

PV

Calculate the distance from the starting point of a given Vector to a specified atom (Point); also calculate the angle between the given vector and the connection vector which starts from the starting point of the given Vector and ends at the specified atom (ie. the Point).

Syntax:
VECTOR PV vector_id [res_id [atom_name]]

Note:
1) The vector_id specifies the input vector. 2) The default atom is the first atom in the residue if specified. If the res_id is not specified, the first ON atom will be used.

Examples:
1) Calculate the distance and angle between the Phe ring of residue 4 and the Ce1 atom of Phe 67.

      initial
      atom cg cd1 cd2 ce1 ce2 ca from { zone 4 }
      planar v1
           ; define v1 as the normal of the ring of residue 4
      vector pv v1 67 ce1
           ; calculate the distance/angle between v1 and 
           ; the ce1 atom of residue 67  

VP

Calculates a new point on the axis defined by a given vector. Replaces both xyz and text string of a given atom with the new coordinates.

Syntax:
VECTOR VP vector_id [res_id [atom_name]] [length]

Note:
1) The vector_id specifies the input vector.
2) The default atom is the first atom in the residue if specified. If the res_id is not specified (ie. shorten as ','), the first ON atom will be used.
3) The coordinates of the new position will be on the straight line which is co-linear to the vector.
4) The length of the vector determines distance between the starting point of the vector and the new position. If the length is negative, the new position will be at the opposite direction of the vector. The default is the vector length of vector_id

See also: AXIS, PV and VV

Examples:
1) Assume we have the rotation matrix in the file rtn.dat. The following commands make a pair of pseudo atoms to display the rotation axis.

	axis rtn.dat v1
	vector vp v1 jnk1 O -100.0
	vector vp v1 jnk2  O 100.0
		; select any atom which can be overwritten.
	initial
	atom O from { zone jnk1 jnk2 }
	write axis.pdb
		; make a PDB file to store the two pseudo atoms.
2) Generate a record to store the geometric center of the protein molecule.
	initial
	more from { ca }
	setw 1.0
	momentinertia  ,  v0
	initial
	vector vp v0 1 ca 0.0
           ; the coordinate of the Ca atom of residue 1 is replaced.

VV

Calculate the projected (shortest) distance and the angle between two vectors. It is useful for, for example, determining of the distance and angles between two helices.

Syntax:
VECTOR VV vector_id1 vector_id2 [vector_id3]

Note:
1) The vector_idn is an text-string of upto four characters. For example, it may be one of the V0, V1, ... V9.
2) Vector_id1 and vector_id2 specify two existing vectors.
3) If the parameter vector_id3 is given, the corresponding vector will store the normalized cross product of the two input vectors (ie. cross from vector(1) to vector(2)). The starting point will be the intersection of vector(1) and the shortest distance line between the two vectors.

See also: AXIS, PV and VP

Examples:
1) Calculate the angle and shortest distance between helix 93 - 104 and helix 115 - 122.

      ! determine the axis of helix 93 - 104
      initial
      group tmp from { main 93 - 103 }
      main 94 - 104
      overlay tmp rtn.dat
      initial
      axis rtn.dat v1
      ! determine the axis of helix 115 - 122
      initial
      group tmp from { main 115 - 121 }
      main 116 - 122
      overlay tmp rtn.dat
      initial
      axis rtn.dat v2
      ! calculate the angle and distance
      vector vv v1 v2

VM

Calculate Vm (Matthews coef.) (Ref. Matthews, B.W. (1968) "Solvent content of protein crystals" J. Mol. Biol. 33: 491-497).

Function: Calculation

Syntax:
VM [mw]

Note:
1) mw is the molecular weight (in kDa) in one asymmetric unit.
2) if mw is not given, the program will use the molecular weight of the selected fragment(s).

See also: MW,

Examples:
1)

      cell 60 60 80 90 90 120 1 !define cell parameters
      @p3121                    !define symmetry operators
      vm 16                     !molecular weight is 16 kDa.

VOLUME

Calculate the volume of the ON atoms enclosed within the solvent accessible surface. (Ref. Lee & Richards, J. Mol. Biol. 1971, Vol 55, pp 379-400). Note that this volume is not the "molecular volume" enclosed within the "molecular surface" defined by Connolly (Ref. Connolly, J. Am. Chem. Soc., Vol 107 No. 5, 1985).

Function: Calculation

Syntax:
VOLUME [probe_radius] [zstep] [file_name]

Note:
1) The default probe_radius is 0.0 angstrom.
2) The zstep is the integration step size along z direction. The default is 0.2 angstrom.
3) A database file in the current directory or in the default directory is required to define the Van der Waals radii of the ON atom.
4) The accuracy of the result can be verified by rotating the object and repeating the calculation.

See also: ACCESS and FILE

Examples:
1) Calculate the van der Waals volume of the side chain of Leu (say residue 99) beyond the CA atom.

      initial
      zone 99
      volume
           ; denote the result as v(99)
      initial
      main 99
      volume
           ; denote the result as v(99m)
The difference of v(99) - v(99m) will be the volume beyond the CA atoms.

2) Estimate the "molecular volume" of the protein molecule.

      initial
      ca
      more
      access , 1.4
           ; get the solvent accessible surface (S) of the protein
           ; molecule with a 1.4 Å probe.
      volume 1.4
           ; get the volume (V) with 
           ; radius = (Van_de_Waals_radius + 1.4Å)
           
      The estimated volume is (V - S*1.4).

Copyright 1995, Cai X.-J. Zhang, All Rights Reserved.