mailr14948 - /1.3/generic_fns/structure/api_base.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 31, 2011 - 17:06:
Author: bugman
Date: Mon Oct 31 17:06:51 2011
New Revision: 14948

URL: http://svn.gna.org/viewcvs/relax?rev=14948&view=rev
Log:
Properly added the add_atom() and connect_atom() methods to the structural 
API.


Modified:
    1.3/generic_fns/structure/api_base.py

Modified: 1.3/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/api_base.py?rev=14948&r1=14947&r2=14948&view=diff
==============================================================================
--- 1.3/generic_fns/structure/api_base.py (original)
+++ 1.3/generic_fns/structure/api_base.py Mon Oct 31 17:06:51 2011
@@ -59,6 +59,35 @@
 
         # Initialise the empty model list.
         self.structural_data = ModelList()
+
+
+    def add_atom(self, mol_name=None, atom_name=None, res_name=None, 
res_num=None, pos=[None, None, None], element=None, atom_num=None, 
chain_id=None, segment_id=None, pdb_record=None):
+        """Add a new atom to the structural data object.
+
+        @keyword mol_name:      The name of the molecule.
+        @type mol_name:         str
+        @keyword atom_name:     The atom name, e.g. 'H1'.
+        @type atom_name:        str or None
+        @keyword res_name:      The residue name.
+        @type res_name:         str or None
+        @keyword res_num:       The residue number.
+        @type res_num:          int or None
+        @keyword pos:           The position vector of coordinates.
+        @type pos:              list (length = 3)
+        @keyword element:       The element symbol.
+        @type element:          str or None
+        @keyword atom_num:      The atom number.
+        @type atom_num:         int or None
+        @keyword chain_id:      The chain identifier.
+        @type chain_id:         str or None
+        @keyword segment_id:    The segment identifier.
+        @type segment_id:       str or None
+        @keyword pdb_record:    The optional PDB record name, e.g. 'ATOM' or 
'HETATM'.
+        @type pdb_record:       str or None
+        """
+
+        # Raise the error.
+        raise RelaxImplementError
 
 
     def add_molecule(self, name=None, model=None):
@@ -178,6 +207,21 @@
         raise RelaxImplementError
 
 
+    def connect_atom(self, mol_name=None, index1=None, index2=None):
+        """Connect two atoms in the structural data object.
+
+        @keyword mol_name:  The name of the molecule.
+        @type mol_name:     str
+        @keyword index1:    The global index of the first atom.
+        @type index1:       str
+        @keyword index2:    The global index of the first atom.
+        @type index2:       str
+        """
+
+        # Raise the error.
+        raise RelaxImplementError
+
+
     def delete(self):
         """Prototype method stub for deleting all structural data from the 
current data pipe."""
 




Related Messages


Powered by MHonArc, Updated Mon Oct 31 18:00:02 2011