Author: bugman Date: Thu Jan 23 15:35:52 2014 New Revision: 22042 URL: http://svn.gna.org/viewcvs/relax?rev=22042&view=rev Log: The lib.structure.represent.rotor.rotor_pdb() function can now handle multiple rotors. Previously this function would fail if called twice with the same structural object. Modified: trunk/lib/structure/represent/rotor.py Modified: trunk/lib/structure/represent/rotor.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/structure/represent/rotor.py?rev=22042&r1=22041&r2=22042&view=diff ============================================================================== --- trunk/lib/structure/represent/rotor.py (original) +++ trunk/lib/structure/represent/rotor.py Thu Jan 23 15:35:52 2014 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2013 Edward d'Auvergne # +# Copyright (C) 2003-2014 Edward d'Auvergne # # # # This file is part of the program relax (http://www.nmr-relax.com). # # # @@ -65,8 +65,13 @@ # Normalise. axis_norm = axis / norm(axis) - # Add a structure. - structure.add_molecule(name='rotor') + # Add a structure (handling up to 3 rotors). + if structure.has_molecule(name='rotor') and structure.has_molecule(name='rotor2'): + structure.add_molecule(name='rotor3') + elif structure.has_molecule(name='rotor'): + structure.add_molecule(name='rotor2') + else: + structure.add_molecule(name='rotor') # Loop over the models. for model in structure.model_loop(model):