Author: bugman Date: Thu Oct 26 10:09:12 2006 New Revision: 2669 URL: http://svn.gna.org/viewcvs/relax?rev=2669&view=rev Log: Fixed the nucleic acid residue names. These names were being prefixed by 'R' by Scientific python, so residue 'G' would be labelled as residue 'RG'! This was causing the user function 'pdb.vectors()' to fail as the residue was expected to be called 'G'. The prefix 'R' is now stripped from the residue name. Modified: 1.3/generic_fns/sequence.py Modified: 1.3/generic_fns/sequence.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/sequence.py?rev=2669&r1=2668&r2=2669&view=diff ============================================================================== --- 1.3/generic_fns/sequence.py (original) +++ 1.3/generic_fns/sequence.py Thu Oct 26 10:09:12 2006 @@ -145,8 +145,10 @@ # Reassign the sequence of the first structure. if self.relax.data.pdb[run].structures[0].peptide_chains: res = self.relax.data.pdb[run].structures[0].peptide_chains[0].residues + molecule = 'protein' elif self.relax.data.pdb[run].structures[0].nucleotide_chains: res = self.relax.data.pdb[run].structures[0].nucleotide_chains[0].residues + molecule = 'nucleic acid' else: raise RelaxNoPdbChainError @@ -158,9 +160,16 @@ # Append a data container. self.relax.data.res[run].add_item() - # Insert the data. + # Residue number. self.relax.data.res[run][i].num = res[i].number - self.relax.data.res[run][i].name = res[i].name + + # Residue name. + if molecule == 'nucleic acid': + self.relax.data.res[run][i].name = res[i].name[-1] + else: + self.relax.data.res[run][i].name = res[i].name + + # Select the residue. self.relax.data.res[run][i].select = 1