Author: bugman
Date: Mon Sep 22 16:44:57 2014
New Revision: 25958
URL: http://svn.gna.org/viewcvs/relax?rev=25958&view=rev
Log:
Added safety checks for NaN values to the lib.structure.pdb_write module.
This is within the _record_validate() function. The check prevents the
creation of invalid PDB
files.
Modified:
trunk/lib/structure/pdb_write.py
Modified: trunk/lib/structure/pdb_write.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/lib/structure/pdb_write.py?rev=25958&r1=25957&r2=25958&view=diff
==============================================================================
--- trunk/lib/structure/pdb_write.py (original)
+++ trunk/lib/structure/pdb_write.py Mon Sep 22 16:44:57 2014
@@ -83,6 +83,10 @@
raise RelaxError("The PDB record '%s' is too short." % record)
else:
raise RelaxError("The PDB record '%s' is too long." % record)
+
+ # Check for nan.
+ if 'nan' in record:
+ raise RelaxError("The PDB record '%s' contains NaN values." % record)
def atom(file, serial='', name='', alt_loc='', res_name='', chain_id='',
res_seq='', icode='', x='', y='', z='', occupancy='', temp_factor='',
element='', charge=''):
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits