Author: bugman Date: Fri Mar 22 09:54:09 2013 New Revision: 18934 URL: http://svn.gna.org/viewcvs/relax?rev=18934&view=rev Log: The rotor frame order models now have the rotor PDB object created for them in _pdb_geometric_rep(). This is used by the frame_order.pdb_model user function. Modified: branches/frame_order_testing/specific_fns/frame_order.py Modified: branches/frame_order_testing/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/frame_order.py?rev=18934&r1=18933&r2=18934&view=diff ============================================================================== --- branches/frame_order_testing/specific_fns/frame_order.py (original) +++ branches/frame_order_testing/specific_fns/frame_order.py Fri Mar 22 09:54:09 2013 @@ -44,6 +44,7 @@ from generic_fns.structure.cones import Iso_cone, Pseudo_elliptic from generic_fns.structure.mass import centre_of_mass from generic_fns.structure.internal import Internal +from lib.structure.rotor import rotor_pdb from lib.text.sectioning import subsection from maths_fns import frame_order, order_parameters from maths_fns.coord_transform import spherical_to_cartesian @@ -1040,8 +1041,33 @@ if neg_cone: model_neg = structure.add_model(model=2) + # The rotor object. + if cdp.model in ['rotor', 'free rotor', 'iso cone', 'iso cone, free rotor', 'pseudo-ellipse']: + # The rotor angle. + if cdp.model in ['free rotor', 'iso cone, free rotor']: + rotor_angle = pi + else: + rotor_angle = cdp.cone_sigma_max + + # Generate the rotor axis. + axis = zeros(3, float64) + spherical_to_cartesian([1.0, cdp.axis_theta, cdp.axis_phi], axis) + + # Get the CoM of the entire molecule to use as the centre of the rotor. + com = centre_of_mass(verbosity=0) + + # Add the rotor object to the structure as a new molecule. + rotor_pdb(structure=structure, rotor_angle=rotor_angle, axis=axis, axis_pt=cdp.pivot, centre=com, span=2e-9, blade_length=5e-10, staggered=False) + + # FIXME: Temporary write out and exit. + print("\nGenerating the PDB file.") + pdb_file = open_write_file(file, dir, force=force) + structure.write_pdb(pdb_file) + pdb_file.close() + return + # Create the molecule. - structure.add_molecule(name=cdp.model) + structure.add_molecule(name='rest') # Alias the molecules. mol = model.mol[0]