![]() |
Bsoft 2.1.4
Bernard's software package
|
Header file for reading reflection files. More...
Classes | |
struct | Batom |
struct | Bresidue |
struct | Bsecondary |
struct | Bmolecule |
struct | Bbond |
struct | Bangle |
struct | Bmolgroup |
Macros | |
#define | MAXSEQLEN 1000000 |
#define | _Bmolecule_ |
Enumerations | |
enum | SecondaryType { RightHandedAlpha = 1 , RightHandedOmega = 2 , RightHandedPi = 3 , RightHandedGamma = 4 , RightHanded310 = 5 , LeftHandedAlpha = 6 , LeftHandedOmega = 7 , LeftHandedGamma = 8 , TwoSevenRibbon = 9 , Polyproline = 10 , Strand = 11 , Turn = 12 } |
Functions | |
Bmolgroup * | molgroup_init () |
Initializes and allocates a new molecule group. More... | |
Bmolecule * | molecule_add (Bmolecule **mol, char *name) |
Adds a molecule to a linked list. More... | |
Bmolecule * | molecule_add (Bmolecule **mol, Bstring &name) |
Bresidue * | residue_add (Bresidue **res, const char *type) |
Adds a residue to a linked list. More... | |
Bresidue * | residue_add (Bresidue **res, Bstring &type) |
Batom * | atom_add (Batom **atom, const char *type) |
Adds an atom to a linked list. More... | |
Batom * | atom_add (Batom **atom, Bstring &type) |
Batom * | atom_copy (Batom *atom) |
long | residue_count (Bmolgroup *molgroup) |
Counts the number of residues in a molecule group. More... | |
long | atom_count (Bmolgroup *molgroup) |
Counts the number of atoms in a molecule group. More... | |
int | atom_clean_type (Batom *atom, const char *type) |
Cleans up the type string and assigns an element code to an atom. More... | |
Bbond * | bond_add (Bbond **bond, Batom *atom1, Batom *atom2, double l, double k) |
Adds a bond to a linked list. More... | |
Bangle * | angle_add (Bangle **angle, Batom *atom1, Batom *atom2, Batom *atom3, double a, double k) |
Adds an angle to a linked list. More... | |
int | molgroup_list_kill (Bmolgroup *molgroup) |
Destroys a molecule group linked list. More... | |
int | molgroup_kill (Bmolgroup *molgroup) |
Destroys a molecule group. More... | |
int | molecule_kill (Bmolecule *mol) |
Destroys a molecule. More... | |
int | residue_kill (Bresidue *res) |
Destroys a residue. More... | |
int | bond_kill (Bbond *bond) |
Dealocates a list of bonds. More... | |
int | angle_kill (Bangle *angle) |
Dealocates a list of angles. More... | |
Bmolgroup * | molgroup_list_copy (Bmolgroup *molgroup) |
Copies a molecule group list. More... | |
Bmolgroup * | molgroup_copy (Bmolgroup *molgroup) |
Copies a molecule group. More... | |
Bmolecule * | molecule_copy (Bmolecule *mol) |
Copies a molecule. More... | |
Bmolecule * | mol_copy_and_add_to_molgroup (Bmolgroup *molgroup, Bmolecule *mol) |
Copies a molecule and assign to a new pointer in the molgroup. More... | |
Bbond * | molgroup_bond_list_copy (Bmolgroup *molgroup, Bmolgroup *molgroupcopy) |
Copies a bond list. More... | |
int | molgroup_from_molgroup_list (Bmolgroup *molgroup) |
Converts a molecule group list to a single molecule group. More... | |
Bmolgroup * | read_molecule (const char *filename, const char *select, const char *paramfile) |
The generalized function for reading molecular files. More... | |
Bmolgroup * | read_molecule (Bstring &filename, Bstring &atom_select, Bstring ¶mfile) |
Bmolgroup * | read_molecule (Bstring *file_list, int set_pbc, Vector3< double > box, Bstring atom_select, Bstring paramfile) |
Reads and catenates multiple molecule files. More... | |
int | write_molecule (char *filename, Bmolgroup *molgroup) |
Writes a molecule group. More... | |
int | write_molecule (Bstring &filename, Bmolgroup *molgroup) |
int | molgroup_list_write (Bstring &filename, Bmolgroup *molgroup) |
Writes a molecule group list. More... | |
long | molgroup_count_molecules (Bmolgroup *molgroup) |
Counts the total number of molecules in a molecule group. More... | |
long | molgroup_count_residues (Bmolgroup *molgroup) |
Counts the total number of residues in a molecule group. More... | |
long | mol_count_residues (Bmolecule *mol) |
Counts the total number of residues in a molecule. More... | |
long | molgroup_count_atoms (Bmolgroup *molgroup) |
Counts the total number of atoms in a molecule group. More... | |
long | mol_count_atoms (Bmolecule *mol) |
Counts the total number of atoms in a molecule. More... | |
int | molgroup_consolidate_gaps (Bmolgroup *molgroup) |
Removes redundant gaps from an alignment. More... | |
long | molgroup_stats (Bmolgroup *molgroup, int show) |
Calculates the statistics of a molecule group. More... | |
long | molgroup_stats (Bmolgroup *molgroup) |
long | mol_stats (Bmolecule *mol, int show) |
Calculates the statistics of a molecule. More... | |
long | mol_stats (Bmolecule *mol) |
int | molecule_update_comment (Bmolgroup *molgroup, int n, char **strings) |
Puts a set of strings and time in the main comment of a molecule group. More... | |
int | molecule_get_masses (Bmolgroup *molgroup, Bstring ¶mfile) |
Gets atomic masses from a parameter file. More... | |
Bbond * | molgroup_bond_list_generate (Bmolgroup *molgroup, double maxlength, int wrap) |
Generates a bond list based on atom separation. More... | |
Bbond * | mol_bond_list_generate (Bmolgroup *molgroup, double bondlength, int wrap) |
Generates an intramolecular distance-based bond list. More... | |
int | molecules_to_molgroups (Bmolgroup *molgroup) |
Converts molecules in a molecule group to individual molecule groups. More... | |
Header file for reading reflection files.
#define _Bmolecule_ |
#define MAXSEQLEN 1000000 |
enum SecondaryType |
Bangle * angle_add | ( | Bangle ** | angle, |
Batom * | atom1, | ||
Batom * | atom2, | ||
Batom * | atom3, | ||
double | a, | ||
double | k | ||
) |
Adds an angle to a linked list.
**angle | pointer to any angle in the list. |
*atom1 | atom1 of angle. |
*atom2 | atom2 of angle (central atom). |
*atom3 | atom3 of angle. |
a | reference angle. |
k | angle strength. |
The function allocates memory for a new angle structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
int angle_kill | ( | Bangle * | angle | ) |
Dealocates a list of angles.
*angle | first angle in the list. |
All angles downstream are deallocated.
Adds an atom to a linked list.
**atom | pointer to any atom in the list. |
*type | atom type. |
The function allocates memory for a new atom structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
int atom_clean_type | ( | Batom * | atom, |
const char * | type | ||
) |
Cleans up the type string and assigns an element code to an atom.
*atom | atom. |
*type | atom type. |
The first two alphanumeric characters of the type string is used to determine the element.
long atom_count | ( | Bmolgroup * | molgroup | ) |
Counts the number of atoms in a molecule group.
*molgroup | the molecule group. |
Adds a bond to a linked list.
**bond | pointer to any bond in the list. |
*atom1 | atom1 of bond. |
*atom2 | atom2 of bond. |
l | reference bond length. |
k | bond strength. |
The function allocates memory for a new bond structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
int bond_kill | ( | Bbond * | bond | ) |
Dealocates a list of bonds.
*bond | first bond in the list. |
All bonds downstream are deallocated.
Generates an intramolecular distance-based bond list.
This function defines bonds on distance and within molecules. If the molecule group already has a bond list, no new bonds are generated.
*molgroup | molecule group structure. |
bondlength | maximum bond length. |
wrap | wrap around periodic boundaries if !=0. |
Copies a molecule and assign to a new pointer in the molgroup.
*molgroup | the molecule group. |
*mol | the molecule to be copied. |
Adds a new molecule to the molecule group identical to the given molecule and returns a pointer to the new molecule.
long mol_count_atoms | ( | Bmolecule * | mol | ) |
Counts the total number of atoms in a molecule.
*mol | the molecule. |
long mol_count_residues | ( | Bmolecule * | mol | ) |
Counts the total number of residues in a molecule.
*mol | the molecule. |
long mol_stats | ( | Bmolecule * | mol | ) |
long mol_stats | ( | Bmolecule * | mol, |
int | show | ||
) |
Calculates the statistics of a molecule.
*mol | the molecule. |
show | flag to show statistics. |
Adds a molecule to a linked list.
**mol | pointer to any molecule in the list. |
*name | molecule name. |
The function allocates memory for a new molecule structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
Copies a molecule.
*mol | the molecule to be copied. |
Generates a new molecule with the same structure as the given molecule.
Gets atomic masses from a parameter file.
*molgroup | the molecule group. |
¶mfile | parameter file name. |
int molecule_kill | ( | Bmolecule * | mol | ) |
Destroys a molecule.
*mol | the molecule. |
int molecule_update_comment | ( | Bmolgroup * | molgroup, |
int | n, | ||
char ** | strings | ||
) |
Puts a set of strings and time in the main comment of a molecule group.
This is designed to pack the command line into a string followed by a second string for the time.
*molgroup | the molecule group. |
n | the number of strings. |
**strings | an array of strings. |
int molecules_to_molgroups | ( | Bmolgroup * | molgroup | ) |
Converts molecules in a molecule group to individual molecule groups.
A new linked list of molecule groups is created and the links to the individual molecules set.
*molgroup | molecule group structure (modified). |
Copies a bond list.
*molgroup | molecule group structure. |
*molgroupcopy | molecule group structure to copy bonds to. |
A copy of the molecule group bond list is generated and returned.
Generates a bond list based on atom separation.
*molgroup | the molecule group. |
maxlength | maximum bond length. |
wrap | wrap around periodic boundaries if !=0. |
int molgroup_consolidate_gaps | ( | Bmolgroup * | molgroup | ) |
Removes redundant gaps from an alignment.
All positions in an alignment with only gaps are removed.
*molgroup | the molecule group. |
Copies a molecule group.
*molgroup | the molecule group. |
All parts of a molecule group are copied to a completely new structure hierarchy, except sequence flag array.
long molgroup_count_atoms | ( | Bmolgroup * | molgroup | ) |
Counts the total number of atoms in a molecule group.
*molgroup | the molecule group. |
long molgroup_count_molecules | ( | Bmolgroup * | molgroup | ) |
Counts the total number of molecules in a molecule group.
*molgroup | the molecule group. |
long molgroup_count_residues | ( | Bmolgroup * | molgroup | ) |
Counts the total number of residues in a molecule group.
*molgroup | the molecule group. |
int molgroup_from_molgroup_list | ( | Bmolgroup * | molgroup | ) |
Converts a molecule group list to a single molecule group.
*molgroup | molecule group list. |
The input molecule group list is replace by a single molecule group.
Bmolgroup * molgroup_init | ( | ) |
Initializes and allocates a new molecule group.
The selection string is set to "all". The spacegroup is set to 1, the space group string to "P 1". The point group is set to "C1". The unit cell is set to 1,1,1,90,90,90.
int molgroup_kill | ( | Bmolgroup * | molgroup | ) |
Destroys a molecule group.
*molgroup | the molecule group. |
Copies a molecule group list.
*molgroup | the molecule group list. |
All molecule groups are copied to a completely new list.
int molgroup_list_kill | ( | Bmolgroup * | molgroup | ) |
Destroys a molecule group linked list.
*molgroup | the molecule group linked list. |
Writes a molecule group list.
The output files are numbered if the list constains more than one molecule group.
*filename | the file name. |
*molgroup | the molecule group. |
long molgroup_stats | ( | Bmolgroup * | molgroup | ) |
long molgroup_stats | ( | Bmolgroup * | molgroup, |
int | show | ||
) |
Calculates the statistics of a molecule group.
*molgroup | molecule group. |
show | flag to show statistics. |
Bmolgroup * read_molecule | ( | Bstring * | file_list, |
int | set_pbc, | ||
Vector3< double > | box, | ||
Bstring | atom_select, | ||
Bstring | paramfile | ||
) |
Reads and catenates multiple molecule files.
file_list | list of file names. |
set_pbc | flag to fit within periodic boundaries. |
box | periodic boundary box. |
atom_select | atomic selection. |
paramfile | atomic parameters. |
Bmolgroup * read_molecule | ( | const char * | filename, |
const char * | atom_select, | ||
const char * | paramfile | ||
) |
The generalized function for reading molecular files.
*filename | the file name. |
*atom_select | a selection string. |
*paramfile | parameter file name. |
All sequence and atomic coordinate information is read from a file into an internal hierarchy of structures in linked lists: Bmolgroup molecule group or collection of molecules Bmolecule linked list of molecules in the group Bresidue linked list of residues in a molecule Batom linked list of atoms in a residue Bbond linked list of bonds in the molecule group The selection string is used to select for specific atom types: CA C-alpha atoms only The parameter file is used to load atomic properties, such as mass and charge. The default file is bsoft/parameters/atom_prop.star. The input format is based on the file name extension.
Adds a residue to a linked list.
**res | pointer to any residue in the list. |
*type | residue type. |
The function allocates memory for a new residue structure. If the content of the pointer is null, the new structure is the first in the list. Otherwise, the end of the list is found and the new structure added to it.
long residue_count | ( | Bmolgroup * | molgroup | ) |
Counts the number of residues in a molecule group.
*molgroup | the molecule group. |
int residue_kill | ( | Bresidue * | res | ) |
Destroys a residue.
*res | the residue. |
int write_molecule | ( | char * | filename, |
Bmolgroup * | molgroup | ||
) |
Writes a molecule group.
The output format is based on the file name extension.
*filename | the file name. |
*molgroup | the molecule group. |