mailr26324 - /trunk/lib/structure/internal/molecules.py


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

Header


Content

Posted by edward on October 21, 2014 - 14:17:
Author: bugman
Date: Tue Oct 21 14:17:49 2014
New Revision: 26324

URL: http://svn.gna.org/viewcvs/relax?rev=26324&view=rev
Log:
Modified the internal structural object backend for the structure.read_pdb 
user function.

The MolContainer._det_pdb_element() method for handling PDB files with 
missing element information
has been updated to use the Periodic_table.has_element() method to check if 
the PDB atom name
corresponds to any atoms in the periodic table.  This allows for far greater 
support for HETATOMS
and all of the metals.


Modified:
    trunk/lib/structure/internal/molecules.py

Modified: trunk/lib/structure/internal/molecules.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/internal/molecules.py?rev=26324&r1=26323&r2=26324&view=diff
==============================================================================
--- trunk/lib/structure/internal/molecules.py   (original)
+++ trunk/lib/structure/internal/molecules.py   Tue Oct 21 14:17:49 2014
@@ -147,11 +147,8 @@
                 element = key
                 break
 
-        # Allowed element list.
-        elements = ['H', 'C', 'N', 'O', 'F', 'P', 'S']
-
-        # Return the element, if in the list.
-        if element in elements:
+        # Return the element if it is in the periodic table.
+        if periodic_table.has_element(symbol=element):
             return element
 
         # Else, throw a warning.




Related Messages


Powered by MHonArc, Updated Tue Oct 21 15:00:02 2014