|
Bsoft
2.1.0
Bernard's software package
|
Header file for reading reflection files. More...
Go to the source code of this file.
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) |
| 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.
Definition in file rwmolecule.h.
| #define _Bmolecule_ |
Definition at line 193 of file rwmolecule.h.
| #define MAXSEQLEN 1000000 |
Definition at line 14 of file rwmolecule.h.
| enum SecondaryType |
| Enumerator | |
|---|---|
| RightHandedAlpha | |
| RightHandedOmega | |
| RightHandedPi | |
| RightHandedGamma | |
| RightHanded310 | |
| LeftHandedAlpha | |
| LeftHandedOmega | |
| LeftHandedGamma | |
| TwoSevenRibbon | |
| Polyproline | |
| Strand | |
| Turn | |
Definition at line 64 of file rwmolecule.h.
| 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.
Definition at line 312 of file rwmolecule.cpp.
| int angle_kill | ( | Bangle * | angle | ) |
Dealocates a list of angles.
| *angle | first angle in the list. |
All angles downstream are deallocated.
Definition at line 501 of file rwmolecule.cpp.
Definition at line 158 of file rwmolecule.cpp.
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.
Definition at line 152 of file rwmolecule.cpp.
| 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.
Definition at line 229 of file rwmolecule.cpp.
| long atom_count | ( | Bmolgroup * | molgroup | ) |
Counts the number of atoms in a molecule group.
| *molgroup | the molecule group. |
Definition at line 205 of file rwmolecule.cpp.
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.
Definition at line 269 of file rwmolecule.cpp.
| int bond_kill | ( | Bbond * | bond | ) |
Dealocates a list of bonds.
| *bond | first bond in the list. |
All bonds downstream are deallocated.
Definition at line 480 of file rwmolecule.cpp.
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. |
Definition at line 1680 of file rwmolecule.cpp.
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.
Definition at line 664 of file rwmolecule.cpp.
| long mol_count_atoms | ( | Bmolecule * | mol | ) |
Counts the total number of atoms in a molecule.
| *mol | the molecule. |
Definition at line 1140 of file rwmolecule.cpp.
| long mol_count_residues | ( | Bmolecule * | mol | ) |
Counts the total number of residues in a molecule.
| *mol | the molecule. |
Definition at line 1106 of file rwmolecule.cpp.
| long mol_stats | ( | Bmolecule * | mol | ) |
Definition at line 1449 of file rwmolecule.cpp.
| long mol_stats | ( | Bmolecule * | mol, |
| int | show | ||
| ) |
Calculates the statistics of a molecule.
| *mol | the molecule. |
| show | flag to show statistics. |
Definition at line 1362 of file rwmolecule.cpp.
Definition at line 82 of file rwmolecule.cpp.
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.
Definition at line 76 of file rwmolecule.cpp.
Copies a molecule.
| *mol | the molecule to be copied. |
Generates a new molecule with the same structure as the given molecule.
Definition at line 599 of file rwmolecule.cpp.
Gets atomic masses from a parameter file.
| *molgroup | the molecule group. |
| ¶mfile | parameter file name. |
Definition at line 1491 of file rwmolecule.cpp.
| int molecule_kill | ( | Bmolecule * | mol | ) |
Destroys a molecule.
| *mol | the molecule. |
Definition at line 417 of file rwmolecule.cpp.
| 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. |
Definition at line 1467 of file rwmolecule.cpp.
| 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). |
Definition at line 1744 of file rwmolecule.cpp.
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.
Definition at line 706 of file rwmolecule.cpp.
Generates a bond list based on atom separation.
| *molgroup | the molecule group. |
| maxlength | maximum bond length. |
| wrap | wrap around periodic boundaries if !=0. |
Definition at line 1560 of file rwmolecule.cpp.
| 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. |
Definition at line 1249 of file rwmolecule.cpp.
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.
Definition at line 547 of file rwmolecule.cpp.
| long molgroup_count_atoms | ( | Bmolgroup * | molgroup | ) |
Counts the total number of atoms in a molecule group.
| *molgroup | the molecule group. |
Definition at line 1124 of file rwmolecule.cpp.
| long molgroup_count_molecules | ( | Bmolgroup * | molgroup | ) |
Counts the total number of molecules in a molecule group.
| *molgroup | the molecule group. |
Definition at line 1075 of file rwmolecule.cpp.
| long molgroup_count_residues | ( | Bmolgroup * | molgroup | ) |
Counts the total number of residues in a molecule group.
| *molgroup | the molecule group. |
Definition at line 1090 of file rwmolecule.cpp.
| 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.
Definition at line 760 of file rwmolecule.cpp.
| 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.
Definition at line 45 of file rwmolecule.cpp.
| int molgroup_kill | ( | Bmolgroup * | molgroup | ) |
Destroys a molecule group.
| *molgroup | the molecule group. |
Definition at line 374 of file rwmolecule.cpp.
Copies a molecule group list.
| *molgroup | the molecule group list. |
All molecule groups are copied to a completely new list.
Definition at line 522 of file rwmolecule.cpp.
| int molgroup_list_kill | ( | Bmolgroup * | molgroup | ) |
Destroys a molecule group linked list.
| *molgroup | the molecule group linked list. |
Definition at line 347 of file rwmolecule.cpp.
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. |
Definition at line 1053 of file rwmolecule.cpp.
| long molgroup_stats | ( | Bmolgroup * | molgroup | ) |
Definition at line 1349 of file rwmolecule.cpp.
| long molgroup_stats | ( | Bmolgroup * | molgroup, |
| int | show | ||
| ) |
Calculates the statistics of a molecule group.
| *molgroup | molecule group. |
| show | flag to show statistics. |
Definition at line 1296 of file rwmolecule.cpp.
Definition at line 826 of file rwmolecule.cpp.
| 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. |
Definition at line 916 of file rwmolecule.cpp.
| 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.
Definition at line 818 of file rwmolecule.cpp.
Definition at line 119 of file rwmolecule.cpp.
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.
Definition at line 113 of file rwmolecule.cpp.
| long residue_count | ( | Bmolgroup * | molgroup | ) |
Counts the number of residues in a molecule group.
| *molgroup | the molecule group. |
Definition at line 188 of file rwmolecule.cpp.
| int residue_kill | ( | Bresidue * | res | ) |
Destroys a residue.
| *res | the residue. |
Definition at line 453 of file rwmolecule.cpp.
Definition at line 981 of file rwmolecule.cpp.
| 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. |
Definition at line 975 of file rwmolecule.cpp.