Skip to main content
U.S. flag

An official website of the United States government

Here’s how you know

Official government website icon

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

icon-https

Secure .gov websites use HTTPS
A lock ( Lock Locked padlock icon )or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

NIH: National Institute of Diabetes and Digestive and Kidney Diseases NIH: National Institute of Diabetes and Digestive and Kidney Diseases

  next up previous contents index  Xplor-NIH home Documentation

Next: Topology, Parameters and Molecular Up: Vector Statement Previous: Requirements

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 2025-03-21
  • Privacy Policy
  • Freedom of Information Act
  • Accessibility
  • Disclaimers
  • Copyright
  • Vulnerability Disclosure Policy
  • U.S. Department of Health and Human Services
  • National Institutes of Health