mailr8732 - /1.3/generic_fns/structure/scientific.py


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

Header


Content

Posted by edward on February 04, 2009 - 17:24:
Author: bugman
Date: Wed Feb  4 17:24:47 2009
New Revision: 8732

URL: http://svn.gna.org/viewcvs/relax?rev=8732&view=rev
Log:
The read_mol arg now does something in load_pdb()!!!


Modified:
    1.3/generic_fns/structure/scientific.py

Modified: 1.3/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=8732&r1=8731&r2=8732&view=diff
==============================================================================
--- 1.3/generic_fns/structure/scientific.py (original)
+++ 1.3/generic_fns/structure/scientific.py Wed Feb  4 17:24:47 2009
@@ -586,6 +586,11 @@
             # First add the peptide chains (generating the molecule names 
and incrementing the molecule index).
             if hasattr(model, 'peptide_chains'):
                 for mol in model.peptide_chains:
+                    # Only read the required molecule.
+                    if read_mol and mol_index+1 not in read_mol:
+                        mol_index = mol_index + 1
+                        continue
+
                     mol.mol_type = 'protein'
                     mol_conts[-1].append(MolContainer())
                     mol_conts[-1][-1].data = mol
@@ -596,6 +601,11 @@
             # Then the nucleotide chains (generating the molecule names and 
incrementing the molecule index).
             if hasattr(model, 'nucleotide_chains'):
                 for mol in model.nucleotide_chains:
+                    # Only read the required molecule.
+                    if read_mol and mol_index+1 not in read_mol:
+                        mol_index = mol_index + 1
+                        continue
+
                     mol_conts[-1].append(MolContainer())
                     mol_conts[-1][-1].data = mol
                     mol_conts[-1][-1].mol_type = 'nucleic acid'
@@ -605,6 +615,11 @@
             # Finally all other molecules (generating the molecule names and 
incrementing the molecule index).
             if hasattr(model, 'molecules'):
                 for key in model.molecules.keys():
+                    # Only read the required molecule.
+                    if read_mol and mol_index+1 not in read_mol:
+                        mol_index = mol_index + 1
+                        continue
+
                     # Add an empty list-type container.
                     mol_conts[-1].append(MolContainer())
                     mol_conts[-1][-1].mol_type = 'other'




Related Messages


Powered by MHonArc, Updated Wed Feb 04 17:40:01 2009