Info#
Displaying summary information about a molecular system and its elements
MolSysMT provides a function to display a concise summary of a molecular system and its elements: molsysmt.basic.info()
. This function works at different levels depending on the selected element type — atom
, group
, component
, molecule
, chain
, entity
, or system
. The output is a pandas.DataFrame
.
Added in version 1.0.0.
How this function works#
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function:molsysmt.basic.info()
.
Let’s load a molecular system and explore a few examples of how this function works:
import molsysmt as msm
molsys = msm.convert('181L')
By default, molsysmt.basic.info()
supplies a summary of the system as a Pandas dataframe:
msm.info(molsys)
form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_waters | n_ions | n_small_molecules | n_proteins | n_structures |
---|---|---|---|---|---|---|---|---|---|---|---|
molsysmt.MolSys | 1441 | 302 | 141 | 6 | 141 | 5 | 136 | 2 | 2 | 1 | 1 |
Tip
All methods defined in the molsysmt.basic module can be invoked also from the main level of the library. Hence, molsysmt.info()
is the same method as molsysmt.basic.info()
.
But summary information on other elements such as atoms, groups, components, molecules, chains or entities can be obtained.
With atoms#
Example of how the function works at the atom
level:
msm.info(molsys, element='atom', selection='molecule_type=="ion"')
index | id | name | type | group index | group id | group name | group type | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1289 | 1290 | CL | CL | 162 | 173 | CL | ion | 1 | 1 | 1 | ion | 1 | CHLORIDE ION |
1290 | 1291 | CL | CL | 163 | 178 | CL | ion | 2 | 2 | 2 | ion | 1 | CHLORIDE ION |
With groups#
Example of how the function works at the group
level:
msm.info(molsys, element='group', selection=[9,10,11,12])
index | id | name | type | n atoms | component index | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|---|
9 | 10 | ASP | amino acid | 8 | 0 | 0 | 0 | protein | 0 | T4 LYSOZYME |
10 | 11 | GLU | amino acid | 9 | 0 | 0 | 0 | protein | 0 | T4 LYSOZYME |
11 | 12 | GLY | amino acid | 4 | 0 | 0 | 0 | protein | 0 | T4 LYSOZYME |
12 | 13 | LEU | amino acid | 8 | 0 | 0 | 0 | protein | 0 | T4 LYSOZYME |
With components#
The function can also be applied to the component level, as shown below:
msm.info(molsys, element='component', selection='molecule_type=="small molecule"')
index | n atoms | n groups | chain index | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|
3 | 8 | 1 | 3 | 3 | small molecule | 2 | 2-HYDROXYETHYL DISULFIDE |
4 | 6 | 1 | 4 | 4 | small molecule | 3 | BENZENE |
With molecules#
Let’s see an example of how this function works with molecules:
msm.info(molsys, element='molecule',
selection='molecule_type!=["water", "protein"] within 4.0 angstroms of molecule_type=="protein"')
index | name | type | n atoms | n groups | n components | chain index | entity index | entity name |
---|---|---|---|---|---|---|---|---|
1 | CHLORIDE ION | ion | 1 | 1 | 1 | 1 | 1 | CHLORIDE ION |
2 | CHLORIDE ION | ion | 1 | 1 | 1 | 2 | 1 | CHLORIDE ION |
3 | 2-HYDROXYETHYL DISULFIDE | small molecule | 8 | 1 | 1 | 3 | 2 | 2-HYDROXYETHYL DISULFIDE |
4 | BENZENE | small molecule | 6 | 1 | 1 | 4 | 3 | BENZENE |
With chains#
The function can also be applied to chain
elements as shown below:
msm.info(molsys, element='chain', selection='molecule_type=="water"')
index | id | name | n atoms | n groups | n components | molecule index | molecule type | entity index | entity name |
---|---|---|---|---|---|---|---|---|---|
5 | 5 | A | 136 | 136 | 136 | [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140] | ['water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water', 'water'] | 4 | water |
With entities#
This example shows how to obtain a summary of entity
elements:
msm.info(molsys, element='entity')
index | name | type | n atoms | n groups | n components | n chains | n molecules |
---|---|---|---|---|---|---|---|
0 | T4 LYSOZYME | protein | 1289 | 162 | 1 | 1 | 1 |
1 | CHLORIDE ION | ion | 2 | 2 | 2 | 2 | 2 |
2 | 2-HYDROXYETHYL DISULFIDE | small molecule | 8 | 1 | 1 | 1 | 1 |
3 | BENZENE | small molecule | 6 | 1 | 1 | 1 | 1 |
4 | water | water | 136 | 136 | 136 | 1 | 136 |
With system#
Let’s see an example of how this function works with the system (default option):
msm.info(molsys)
form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_waters | n_ions | n_small_molecules | n_proteins | n_structures |
---|---|---|---|---|---|---|---|---|---|---|---|
molsysmt.MolSys | 1441 | 302 | 141 | 6 | 141 | 5 | 136 | 2 | 2 | 1 | 1 |
See also
User guide > Introduction > Molecular System > Elements:
Describe the different hierarchical levels (atom, group, molecule, etc.) used in molecular systems.
User guide > Tools > Basic > Convert:
Convert a molecular system into another form.
User guide > Tools > Basic > Get label:
Generate formatted labels for elements in a molecular system.