Package prompt :: Module molecule :: Class Molecule
[hide private]
[frames] | no frames]

Class Molecule

source code


Class for manipulating the molecule data.

Instance Methods [hide private]
 
copy(self, pipe_from=None, mol_from=None, pipe_to=None, mol_to=None)
Copy all data associated with a molecule.
source code
 
create(self, mol_name=None, mol_type=None)
Create a new molecule.
source code
 
delete(self, mol_id=None)
Deleting molecules from the relax data store.
source code
 
display(self, mol_id=None)
Display the molecule information.
source code
 
name(self, mol_id=None, name=None, force=False)
Name a molecule.
source code
 
type(self, mol_id=None, type=None, force=False)
Set the molecule type.
source code

Inherited from base_class.User_fn_class: __init__

Class Variables [hide private]
  _i = 4
Method Details [hide private]

copy(self, pipe_from=None, mol_from=None, pipe_to=None, mol_to=None)

source code 
Copy all data associated with a molecule.

Keyword Arguments
~~~~~~~~~~~~~~~~~

pipe_from:  The data pipe containing the molecule from which the data will be copied.  This defaults
to the current data pipe.

mol_from:  The name of the molecule from which to copy data from.

pipe_to:  The data pipe to copy the data to.  This defaults to the current data pipe.

mol_to:  The name of the new molecule.  If left blank, the new molecule will have the same name as
the old.


Description
~~~~~~~~~~~

This will copy all the data associated with a molecule to a second molecule.  This includes all
residue and spin system information.  The new molecule name must be unique in the destination data
pipe.


Examples
~~~~~~~~

To copy the molecule data from the molecule 'GST' to the new molecule 'wt-GST', type:

relax> molecule.copy('#GST', '#wt-GST')
relax> molecule.copy(mol_from='#GST', mol_to='#wt-GST')


To copy the molecule data of the molecule 'Ap4Aase' from the data pipe 'm1' to 'm2', assuming the
current
data pipe is 'm1', type:

relax> molecule.copy(mol_from='#ApAase', pipe_to='m2')
relax> molecule.copy(pipe_from='m1', mol_from='#ApAase', pipe_to='m2', mol_to='#ApAase')

create(self, mol_name=None, mol_type=None)

source code 
Create a new molecule.

Keyword Arguments
~~~~~~~~~~~~~~~~~

mol_name:  The name of the new molecule.

mol_type:  The type of molecule.


Description
~~~~~~~~~~~

This adds a new molecule data container to the relax data storage object.  The same molecule name
cannot be used more than once.  The molecule type need not be specified.  However, if given, it
should be one of 'protein', 'DNA', 'RNA', 'organic molecule', 'inorganic molecule', or 'inorganic
molecule'.


Examples
~~~~~~~~

To create the molecules 'Ap4Aase', 'ATP', and 'MgF4', type:

relax> molecule.create('Ap4Aase')
relax> molecule.create('ATP')
relax> molecule.create('MgF4')

delete(self, mol_id=None)

source code 
Deleting molecules from the relax data store.

Keyword Arguments
~~~~~~~~~~~~~~~~~

mol_id:  The molecule ID string.


Description
~~~~~~~~~~~

This can be used to delete a single or sets of molecules from the relax data store.  The molecule
will be deleted from the current data pipe.


Spin ID string documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The identification string is composed of three components: the molecule id token beginning with the
'#' character, the residue id token beginning with the ':' character, and the atom or spin system id
token beginning with the '@' character.  Each token can be composed of multiple elements separated
by the ',' character and each individual element can either be a number (which must be an integer,
in string format), a name, or a range of numbers separated by the '-' character.  Negative numbers
are supported.  The full id string specification is '#<mol_name> :<res_id>[, <res_id>[, <res_id>,
...]] @<atom_id>[, <atom_id>[, <atom_id>, ...]]', where the token elements are '<mol_name>', the
name of the molecule, '<res_id>', the residue identifier which can be a number, name, or range of
numbers, '<atom_id>', the atom or spin system identifier which can be a number, name, or range of
numbers.

If one of the tokens is left out then all elements will be assumed to match.  For example if the
string does not contain the '#' character then all molecules will match the string.

Regular expression can be used to select spins.  For example the string '@H*' will select the
protons 'H', 'H2', 'H98'.

display(self, mol_id=None)

source code 
Display the molecule information.

Keyword Arguments
~~~~~~~~~~~~~~~~~

mol_id:  The molecule ID string.



Spin ID string documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The identification string is composed of three components: the molecule id token beginning with the
'#' character, the residue id token beginning with the ':' character, and the atom or spin system id
token beginning with the '@' character.  Each token can be composed of multiple elements separated
by the ',' character and each individual element can either be a number (which must be an integer,
in string format), a name, or a range of numbers separated by the '-' character.  Negative numbers
are supported.  The full id string specification is '#<mol_name> :<res_id>[, <res_id>[, <res_id>,
...]] @<atom_id>[, <atom_id>[, <atom_id>, ...]]', where the token elements are '<mol_name>', the
name of the molecule, '<res_id>', the residue identifier which can be a number, name, or range of
numbers, '<atom_id>', the atom or spin system identifier which can be a number, name, or range of
numbers.

If one of the tokens is left out then all elements will be assumed to match.  For example if the
string does not contain the '#' character then all molecules will match the string.

Regular expression can be used to select spins.  For example the string '@H*' will select the
protons 'H', 'H2', 'H98'.

name(self, mol_id=None, name=None, force=False)

source code 
Name a molecule.

Keyword Arguments
~~~~~~~~~~~~~~~~~

mol_id:  The molecule ID string corresponding to one or more molecules.

name:  The new molecule name.

force:  A flag which if True will cause the molecule to be renamed.


Description
~~~~~~~~~~~

This simply allows molecules to be named (or renamed).


Examples
~~~~~~~~

To rename the molecule 'Ap4Aase' to 'Inhib Ap4Aase', type one of:

relax> molecule.name('#Ap4Aase', 'Inhib Ap4Aase', True)
relax> molecule.name(mol_id='#Ap4Aase', name='Inhib Ap4Aase', force=True)

This assumes the molecule 'Ap4Aase' already exists.


Spin ID string documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The identification string is composed of three components: the molecule id token beginning with the
'#' character, the residue id token beginning with the ':' character, and the atom or spin system id
token beginning with the '@' character.  Each token can be composed of multiple elements separated
by the ',' character and each individual element can either be a number (which must be an integer,
in string format), a name, or a range of numbers separated by the '-' character.  Negative numbers
are supported.  The full id string specification is '#<mol_name> :<res_id>[, <res_id>[, <res_id>,
...]] @<atom_id>[, <atom_id>[, <atom_id>, ...]]', where the token elements are '<mol_name>', the
name of the molecule, '<res_id>', the residue identifier which can be a number, name, or range of
numbers, '<atom_id>', the atom or spin system identifier which can be a number, name, or range of
numbers.

If one of the tokens is left out then all elements will be assumed to match.  For example if the
string does not contain the '#' character then all molecules will match the string.

Regular expression can be used to select spins.  For example the string '@H*' will select the
protons 'H', 'H2', 'H98'.

type(self, mol_id=None, type=None, force=False)

source code 
Set the molecule type.

Keyword Arguments
~~~~~~~~~~~~~~~~~

mol_id:  The molecule ID string corresponding to one or more molecules.

type:  The molecule type.

force:  A flag which if True will cause the molecule to type to be overwritten.


Description
~~~~~~~~~~~

This allows the type of the molecule to be specified.  It can be one of:

            'protein',
    'DNA',
    'RNA',
    'organic molecule',
    'inorganic molecule',
    'inorganic molecule'.


Examples
~~~~~~~~

To set the molecule 'Ap4Aase' to the 'protein' type, type one of:

relax> molecule.type('#Ap4Aase', 'protein', True)
relax> molecule.type(mol_id='#Ap4Aase', type='protein', force=True)


Spin ID string documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The identification string is composed of three components: the molecule id token beginning with the
'#' character, the residue id token beginning with the ':' character, and the atom or spin system id
token beginning with the '@' character.  Each token can be composed of multiple elements separated
by the ',' character and each individual element can either be a number (which must be an integer,
in string format), a name, or a range of numbers separated by the '-' character.  Negative numbers
are supported.  The full id string specification is '#<mol_name> :<res_id>[, <res_id>[, <res_id>,
...]] @<atom_id>[, <atom_id>[, <atom_id>, ...]]', where the token elements are '<mol_name>', the
name of the molecule, '<res_id>', the residue identifier which can be a number, name, or range of
numbers, '<atom_id>', the atom or spin system identifier which can be a number, name, or range of
numbers.

If one of the tokens is left out then all elements will be assumed to match.  For example if the
string does not contain the '#' character then all molecules will match the string.

Regular expression can be used to select spins.  For example the string '@H*' will select the
protons 'H', 'H2', 'H98'.