Author: bugman Date: Tue Mar 19 11:37:50 2013 New Revision: 18873 URL: http://svn.gna.org/viewcvs/relax?rev=18873&view=rev Log: Fix for the internal structural object _pdb_chain_id_to_mol_index() method. This was accidentally set to be a method of the MolContainer class and not the internal object. Modified: trunk/generic_fns/structure/internal.py Modified: trunk/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/internal.py?rev=18873&r1=18872&r2=18873&view=diff ============================================================================== --- trunk/generic_fns/structure/internal.py (original) +++ trunk/generic_fns/structure/internal.py Tue Mar 19 11:37:50 2013 @@ -640,6 +640,26 @@ # If records is not empty then there is only a single molecule, so yield the lot. if len(mol_records): yield mol_num, mol_records + + + def _pdb_chain_id_to_mol_index(self, chain_id=None): + """Convert the PDB chain ID into the molecule index in a regular way. + + @keyword chain_id: The PDB chain ID string. + @type chain_id: str + @return: The corresponding molecule index. + @rtype: int + """ + + # Initialise. + mol_index = 0 + + # Convert to the molecule index. + if chain_id: + mol_index = uppercase.index(chain_id) + + # Return the index. + return mol_index def _validate_data_arrays(self, struct): @@ -2169,26 +2189,6 @@ return fields - def _pdb_chain_id_to_mol_index(self, chain_id=None): - """Convert the PDB chain ID into the molecule index in a regular way. - - @keyword chain_id: The PDB chain ID string. - @type chain_id: str - @return: The corresponding molecule index. - @rtype: int - """ - - # Initialise. - mol_index = 0 - - # Convert to the molecule index. - if chain_id: - mol_index = uppercase.index(chain_id) - - # Return the index. - return mol_index - - def atom_add(self, 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): """Method for adding an atom to the structural data object.