mailr8223 - in /branches/multi_structure/generic_fns/structure: api_base.py internal.py main.py scientific.py


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

Header


Content

Posted by edward on December 18, 2008 - 17:16:
Author: bugman
Date: Thu Dec 18 17:16:03 2008
New Revision: 8223

URL: http://svn.gna.org/viewcvs/relax?rev=8223&view=rev
Log:
Add structural object load_pdb() methods now take the read_mol, set_mol_name, 
read_model, set_model_num args.


Modified:
    branches/multi_structure/generic_fns/structure/api_base.py
    branches/multi_structure/generic_fns/structure/internal.py
    branches/multi_structure/generic_fns/structure/main.py
    branches/multi_structure/generic_fns/structure/scientific.py

Modified: branches/multi_structure/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/api_base.py?rev=8223&r1=8222&r2=8223&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/api_base.py (original)
+++ branches/multi_structure/generic_fns/structure/api_base.py Thu Dec 18 
17:16:03 2008
@@ -285,7 +285,7 @@
                     warn(RelaxWarning("The structure file " + `self.file[i]` 
+ " cannot be found in the current directory or the directory of the results 
file."))
 
 
-    def load_pdb(self, file_path, model=None, struct_index=None, 
verbosity=False):
+    def load_pdb(self, file_path, read_mol=None, set_mol_name=None, 
read_model=None, set_model_num=None, struct_index=None, verbosity=False):
         """Prototype method stub for loading structures from a PDB file.
 
         This inherited prototype method is a stub which, if the 
functionality is desired, should be
@@ -294,8 +294,21 @@
 
         @param file_path:       The full path of the PDB file.
         @type file_path:        str
-        @param model:           The structural model to use.
-        @type model:            int
+        @keyword read_mol:      The molecule(s) to read from the file, 
independent of model.  The
+                                molecules are determined differently by the 
different parsers, but
+                                are numbered consecutively from 1.  If set 
to None, then all
+                                molecules will be loaded.
+        @type read_mol:         None, int, or list of int
+        @keyword set_mol_name:  Set the names of the molecules which are 
loaded.  If set to None,
+                                then the molecules will be automatically 
labelled based on the file
+                                name or other information.
+        @type set_mol_name:     None, str, or list of str
+        @keyword read_model:    The PDB model to extract from the file.  If 
set to None, then all
+                                models will be loaded.
+        @type read_model:       None, int, or list of int
+        @keyword set_model_num: Set the model number of the loaded molecule. 
 If set to None, then
+                                the PDB model numbers will be preserved, if 
they exist.
+        @type set_model_num:    None, int, or list of int
         @param struct_index:    The index of the structure.  This optional 
argument can be useful
                                 for reloading a structure.
         @type struct_index:     int

Modified: branches/multi_structure/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/internal.py?rev=8223&r1=8222&r2=8223&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/internal.py (original)
+++ branches/multi_structure/generic_fns/structure/internal.py Thu Dec 18 
17:16:03 2008
@@ -841,13 +841,26 @@
         return data
 
 
-    def load_pdb(self, file_path, model=None, struct_index=None, 
verbosity=False):
+    def load_pdb(self, file_path, read_mol=None, set_mol_name=None, 
read_model=None, set_model_num=None, struct_index=None, verbosity=False):
         """Method for loading structures from a PDB file.
 
         @param file_path:       The full path of the PDB file.
         @type file_path:        str
-        @param model:           The PDB model to use.  If None, all models 
will be loaded.
-        @type model:            int or None
+        @keyword read_mol:      The molecule(s) to read from the file, 
independent of model.  The
+                                molecules are determined differently by the 
different parsers, but
+                                are numbered consecutively from 1.  If set 
to None, then all
+                                molecules will be loaded.
+        @type read_mol:         None, int, or list of int
+        @keyword set_mol_name:  Set the names of the molecules which are 
loaded.  If set to None,
+                                then the molecules will be automatically 
labelled based on the file
+                                name or other information.
+        @type set_mol_name:     None, str, or list of str
+        @keyword read_model:    The PDB model to extract from the file.  If 
set to None, then all
+                                models will be loaded.
+        @type read_model:       None, int, or list of int
+        @keyword set_model_num: Set the model number of the loaded molecule. 
 If set to None, then
+                                the PDB model numbers will be preserved, if 
they exist.
+        @type set_model_num:    None, int, or list of int
         @param struct_index:    The index of the structure.  This optional 
argument can be useful
                                 for reloading a structure.
         @type struct_index:     int

Modified: branches/multi_structure/generic_fns/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/main.py?rev=8223&r1=8222&r2=8223&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/main.py (original)
+++ branches/multi_structure/generic_fns/structure/main.py Thu Dec 18 
17:16:03 2008
@@ -236,7 +236,7 @@
             cdp.structure = Internal()
 
     # Load the structures.
-    cdp.structure.load_pdb(file_path, model, verbosity=verbosity)
+    cdp.structure.load_pdb(file_path, read_mol=read_mol, 
set_mol_name=set_mol_name, read_model=read_model, 
set_model_num=set_model_num, verbosity=verbosity)
 
     # Load into Molmol (if running).
     molmol.open_pdb()

Modified: branches/multi_structure/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/scientific.py?rev=8223&r1=8222&r2=8223&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/scientific.py (original)
+++ branches/multi_structure/generic_fns/structure/scientific.py Thu Dec 18 
17:16:03 2008
@@ -520,13 +520,26 @@
         return data
 
 
-    def load_pdb(self, file_path, model=None, struct_index=None, 
verbosity=False):
+    def load_pdb(self, file_path, read_mol=None, set_mol_name=None, 
read_model=None, set_model_num=None, struct_index=None, verbosity=False):
         """Function for loading the structures from the PDB file.
 
         @param file_path:       The full path of the file.
         @type file_path:        str
-        @param model:           The PDB model to use.  If None, all models 
will be loaded.
-        @type model:            int or None
+        @keyword read_mol:      The molecule(s) to read from the file, 
independent of model.  The
+                                molecules are determined differently by the 
different parsers, but
+                                are numbered consecutively from 1.  If set 
to None, then all
+                                molecules will be loaded.
+        @type read_mol:         None, int, or list of int
+        @keyword set_mol_name:  Set the names of the molecules which are 
loaded.  If set to None,
+                                then the molecules will be automatically 
labelled based on the file
+                                name or other information.
+        @type set_mol_name:     None, str, or list of str
+        @keyword read_model:    The PDB model to extract from the file.  If 
set to None, then all
+                                models will be loaded.
+        @type read_model:       None, int, or list of int
+        @keyword set_model_num: Set the model number of the loaded molecule. 
 If set to None, then
+                                the PDB model numbers will be preserved, if 
they exist.
+        @type set_model_num:    None, int, or list of int
         @param struct_index:    The index of the structure.  This optional 
argument can be useful
                                 for reloading a structure.
         @type struct_index:     int




Related Messages


Powered by MHonArc, Updated Tue Dec 23 17:20:02 2008