Author: bugman Date: Fri Jul 4 18:43:32 2008 New Revision: 6680 URL: http://svn.gna.org/viewcvs/relax?rev=6680&view=rev Log: Added code to connect atoms via CONECT records in the internal PDB reader. Modified: branches/rdc_analysis/generic_fns/structure/internal.py Modified: branches/rdc_analysis/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/internal.py?rev=6680&r1=6679&r2=6680&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/internal.py (original) +++ branches/rdc_analysis/generic_fns/structure/internal.py Fri Jul 4 18:43:32 2008 @@ -70,6 +70,12 @@ # Add the atom. if record[0] == 'ATOM' or record[0] == 'HETATM': self.atom_add(pdb_record=record[0], atom_num=record[1], atom_name=record[2], res_name=record[4], chain_id=record[5], res_num=record[6], pos=[record[8], record[9], record[10]], segment_id=record[13], element=record[14], struct_index=struct_index) + + # Connect atoms. + if record[0] == 'CONECT': + # Loop over the atoms of the record. + for i in xrange(len(record)-2): + self.atom_connect(index1=self.__atom_index(atom_num=record[1]), index2=self.__atom_index(atom_num=record[i+2]), struct_index=struct_index) def __get_chemical_name(self, hetID):