Examples

The first example divides the coordinate array Z by the derivative array DX, adds the quotient to the coordinate array Y, and stores the result in the coordinate array X. The operations are carried out component by component for all atoms.
vector do ( X = Y + Z / DX ) ( all )

The next example computes a Gaussian distribution with standard deviation 1.0 and stores the result in the coordinate array x for all C$^\alpha$ atoms:

vector do ( X = GAUSS( 1.0 ) ) ( name ca )

The next example provides a listing of the X coordinates of all Tyr residues:

vector show element ( X ) ( resname tyr )

The next example computes the average of all electric charges in residue 34. This average value is then stored in the symbol $1 by using the evaluate statement.

vector show ave ( charge ) ( residue 34 )
evaluate ($1=$RESULT)

The next example stores the specified atom selection in the array STORE1:

vector identity ( store1 ) ( attribute mass > 30.0 )

The array STORE1 will be nonzero for the selected atoms and zero otherwise. The values for the selected atoms represent the sequential number of the selected atoms. The array STORE1 can be recalled by using

 ( store1 )
in a selection statement.

Xplor-NIH 2023-11-10