stacker.res_distance_routine

stacker.res_distance_routine#

res_distance_routine()[source]#

Calculates the distance between the centers of mass of two specified residues.

This routine filters the trajectory based on the specified residues and atom names, and calculates the distances for either a single frame or multiple frames if bootstrapping is enabled.

Parameters:
None

The routine relies on global args for all input values.

Raises:
ResEmpty

If fewer or more than two residues are specified, or if no residues are provided.

AtomEmpty

If no atom names are provided.

See also

filter_traj

Filters the trajectory for the specified residues and atom names.

calculate_residue_distance

Calculates the distance between residues for a given frame.

Notes

  • The args.residues argument must contain exactly two residues.

  • The args.atom_names argument is required to specify the atoms involved in the calculation.

  • If the –bootstrap argument is provided, distances are calculated across a specified number of randomly sampled frames.

  • If no bootstrap is performed, the distance is calculated for a single frame.

Examples

Command-line usage:

$ stacker -s res_distance 
    -trj testing/first10_5JUP_N2_tUAG_aCUA_+1GCU_nowat.mdcrd 
    -top testing/5JUP_N2_tUAG_aCUA_+1GCU_nowat.prmtop 
    -f 2 
    --residues 426,427 
    --atom_names C2,C4,C6