/Users/bernard/b20/bsoft/src/mol/mol_util.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/mol/mol_util.cpp - Library routines used for atomic coordinates.

SYNOPSIS

#include 'rwmolecule.h'
#include 'rwatomprop.h'
#include 'rwresprop.h'
#include 'mol_util.h'
#include 'seq_util.h'
#include 'linked_list.h'
#include 'Matrix.h'
#include 'utilities.h'
#include <map>

  Functions
int molgroup_Bfactors (Bmolgroup *molgroup)
Calculates the average Bfactors for residues in molecules.
int molgroup_print_sequence (Bmolgroup *molgroup)
Prints the sequence of a molecule as a single letter code string.
int molgroup_set_radius (Bmolgroup *molgroup, double radius)
Shifts all coordinates to a given radius.
int molgroup_rename (Bmolgroup *molgroup, char first_name)
Renames molecules.
int molgroup_residue_renumber (Bmolgroup *molgroup, int first)
Renumbers residues.
int molgroup_atom_renumber (Bmolgroup *molgroup, int first)
Renumbers all atoms, disregarding molecule distinction.
int molgroup_coor_reset_occupancy (Bmolgroup *molgroup, int range_first, int range_last, double occupancy)
Sets occupancies to new values..
double molgroup_calculate_weight (Bmolgroup *molgroup)
Calculates the weight of each molecule.
Vector3< double > molgroup_center_of_mass (Bmolgroup *molgroup)
Calculates the center of mass of a molecule group.
Vector3< double > molgroup_selected_center_of_mass (Bmolgroup *molgroup)
Calculates the center of mass of a molecule group.
Vector3< double > molgroup_show_center_of_mass (Bmolgroup *molgroup)
Calculates the center of mass of a molecule group.
Vector3< double > mol_center_of_mass (Bmolecule *mol)
Calculates the center of mass of a molecule.
Vector3< double > mol_show_center_of_mass (Bmolecule *mol)
Calculates the center of mass of a molecule.
Vector3< double > molgroup_principal_axes (Bmolgroup *molgroup, Vector3< double > *eigenvec)
Calculates the principal axes of a molecule group.
Vector3< double > mol_principal_axes (Bmolecule *mol, Vector3< double > *eigenvec)
Calculates the principal axes of a molecule.
double molgroup_density (Bmolgroup *molgroup)
Calculates the number and mass density of a molecular system.
double molgroup_volume (Bmolgroup *molgroup, Bstring &paramfile, int wrap)
Calculates the volume of a molecular system.
int molgroup_composition (Bmolgroup *molgroup, Bstring &paramfile)
Calculates the elemental composition of a molecular system.
int molgroup_radial_density (Bmolgroup *molgroup, double interval, double cutoff, int wrap)
Calculates a radial distribution function.
Latom ** molgroup_atom_mesh_lists (Bmolgroup *molgroup, Vector3< int > size, Vector3< double > sampling)
Generates lists of atoms based on a grid.
Batom ** atom_get_array (Bmolgroup *molgroup, long *natom)
Generates an array of pointers to atom structures.

  Variables
int verbose

Detailed Description

Library routines used for atomic coordinates.

Author:
    Bernard Heymann

Date:
    Created: 19980214

    Modified: 20180622

Definition in file mol_util.cpp.

Function Documentation

  Batom** atom_get_array (Bmolgroup * molgroup, long * natom)

Generates an array of pointers to atom structures.

Parameters:
    *molgroup molecule group structure to be modified.
    *natom pointer to number of atoms found.

Returns:
    Batom** array of pointers to atoms.

Definition at line 931 of file mol_util.cpp.

  Vector3<double> mol_center_of_mass (Bmolecule * mol)

Calculates the center of mass of a molecule.

Parameters:
    *mol molecule structure.

Returns:
    Vector3<double> 3-valued center of mass vector.

Definition at line 401 of file mol_util.cpp.

  Vector3<double> mol_principal_axes (Bmolecule * mol, Vector3< double > * eigenvec)

Calculates the principal axes of a molecule.

Parameters:
    *mol molecule structure.
    *eigenvec eigen vectors (can be NULL).

Returns:
    Vector3<double> 3-valued vector of principal axes.

Definition at line 500 of file mol_util.cpp.

  Vector3<double> mol_show_center_of_mass (Bmolecule * mol)

Calculates the center of mass of a molecule.

Parameters:
    *mol molecule structure.

Returns:
    Vector3<double> 3-valued center of mass vector.

Definition at line 439 of file mol_util.cpp.

  Latom** molgroup_atom_mesh_lists (Bmolgroup * molgroup, Vector3< int > size, Vector3< double > sampling)

Generates lists of atoms based on a grid.

The coordinates must be positive to fit into a grid starting at {0,0,0}.

Parameters:
    *molgroup molecule group structure to be modified.
    size size of grid.
    sampling spacing in each dimension.

Returns:
    Latom** array of linked lists of atoms.

Definition at line 882 of file mol_util.cpp.

  int molgroup_atom_renumber (Bmolgroup * molgroup, int first)

Renumbers all atoms, disregarding molecule distinction.

Parameters:
    *molgroup molecule group structure.
    first number of first atom.

Returns:
    int 0.

Definition at line 211 of file mol_util.cpp.

  int molgroup_Bfactors (Bmolgroup * molgroup)

Calculates the average Bfactors for residues in molecules.

Parameters:
    *molgroup molecule group structure.

Returns:
    int 0.

Definition at line 28 of file mol_util.cpp.

  double molgroup_calculate_weight (Bmolgroup * molgroup)

Calculates the weight of each molecule.

Parameters:
    *molgroup molecule group structure.

Returns:
    double total mass of the molecule group.

Definition at line 270 of file mol_util.cpp.

  Vector3<double> molgroup_center_of_mass (Bmolgroup * molgroup)

Calculates the center of mass of a molecule group.

Parameters:
    *molgroup molecule group structure.

Returns:
    Vector3<double> 3-valued center of mass vector.

Definition at line 307 of file mol_util.cpp.

  int molgroup_composition (Bmolgroup * molgroup, Bstring & paramfile)

Calculates the elemental composition of a molecular system.

Parameters:
    *molgroup molecule group structure.
    &paramfile atomic parameter file.

Returns:
    int 0.

Definition at line 699 of file mol_util.cpp.

  int molgroup_coor_reset_occupancy (Bmolgroup * molgroup, int range_first, int range_last, double occupancy)

Sets occupancies to new values..

Parameters:
    *molgroup molecule group structure.
    range_first first residue in range to change.
    range_last last residue in range to change.
    occupancy value to set occupancy to.

Returns:
    int 0.

Definition at line 243 of file mol_util.cpp.

  double molgroup_density (Bmolgroup * molgroup)

Calculates the number and mass density of a molecular system.

Requirement: The box size must be correctly specified in the
molecular group structure.
The number of molecules, residues and atoms are calculated and the
density for each number reported.
The total mass is calculated and the mass density reported as
Da/A^3 and g/ml.

Parameters:
    *molgroup molecule group structure.

Returns:
    double density: Da/A^3.

Definition at line 548 of file mol_util.cpp.

  Vector3<double> molgroup_principal_axes (Bmolgroup * molgroup, Vector3< double > * eigenvec)

Calculates the principal axes of a molecule group.

Parameters:
    *molgroup molecule group structure.
    *eigenvec eigen vectors (can be NULL).

Returns:
    Vector3<double> 3-valued vector of principal axes.

Definition at line 455 of file mol_util.cpp.

  int molgroup_print_sequence (Bmolgroup * molgroup)

Prints the sequence of a molecule as a single letter code string.

Parameters:
    *molgroup molecule group structure.

Returns:
    int 0.

Definition at line 92 of file mol_util.cpp.

  int molgroup_radial_density (Bmolgroup * molgroup, double interval, double cutoff, int wrap)

Calculates a radial distribution function.

Parameters:
    *molgroup molecule group.
    interval interval between bins.
    cutoff distance cutoff.
    wrap flag to use periodic boundaries.

Returns:
    int 0.

    The atoms are not distinguished by type or properties.

Definition at line 780 of file mol_util.cpp.

  int molgroup_rename (Bmolgroup * molgroup, char first_name)

Renames molecules.

Parameters:
    *molgroup molecule group structure.
    first_name letter of first molecule.

Returns:
    int 0.

    Letters are assigned to the molecules in sequence starting from the
    given first letter. If it extends beyond 'Z', it restarts at 'A'.

Definition at line 161 of file mol_util.cpp.

  int molgroup_residue_renumber (Bmolgroup * molgroup, int first)

Renumbers residues.

Parameters:
    *molgroup molecule group structure.
    first number of first residue.

Returns:
    int 0.

Definition at line 182 of file mol_util.cpp.

  Vector3<double> molgroup_selected_center_of_mass (Bmolgroup * molgroup)

Calculates the center of mass of a molecule group.

Parameters:
    *molgroup molecule group structure.

Returns:
    Vector3<double> 3-valued center of mass vector.

Definition at line 347 of file mol_util.cpp.

  int molgroup_set_radius (Bmolgroup * molgroup, double radius)

Shifts all coordinates to a given radius.

Parameters:
    *molgroup molecule group structure.
    radius spherical radius.

Returns:
    int 0.

Definition at line 114 of file mol_util.cpp.

  Vector3<double> molgroup_show_center_of_mass (Bmolgroup * molgroup)

Calculates the center of mass of a molecule group.

Parameters:
    *molgroup molecule group structure.

Returns:
    Vector3<double> 3-valued center of mass vector.

Definition at line 387 of file mol_util.cpp.

  double molgroup_volume (Bmolgroup * molgroup, Bstring & paramfile, int wrap)

Calculates the volume of a molecular system.

The volume occupied by all the atoms is estimated from the footprint
under the Van der Waals volume of each atom.

Parameters:
    *molgroup molecule group structure.
    &paramfile atomic parameter file.
    wrap flag to turn on wrapping.

Returns:
    double volume in angstrom^3.

Definition at line 586 of file mol_util.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.