mailr9157 - in /branches/frame_order: prompt/frame_order.py specific_fns/frame_order.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 25, 2009 - 16:34:
Author: bugman
Date: Thu Jun 25 16:34:17 2009
New Revision: 9157

URL: http://svn.gna.org/viewcvs/relax?rev=9157&view=rev
Log:
Changed the scaling arg to a direct size arg.


Modified:
    branches/frame_order/prompt/frame_order.py
    branches/frame_order/specific_fns/frame_order.py

Modified: branches/frame_order/prompt/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order/prompt/frame_order.py?rev=9157&r1=9156&r2=9157&view=diff
==============================================================================
--- branches/frame_order/prompt/frame_order.py (original)
+++ branches/frame_order/prompt/frame_order.py Thu Jun 25 16:34:17 2009
@@ -46,13 +46,13 @@
         self.__relax__ = relax
 
 
-    def cone_pdb(self, scale=1.0, file='cone.pdb', dir=None, force=False):
+    def cone_pdb(self, size=30.0, file='cone.pdb', dir=None, force=False):
         """Create a PDB file representing the Frame Order cone models.
 
         Keyword Arguments
         ~~~~~~~~~~~~~~~~~
 
-        scale:  Value for scaling the cone, which defaults to 10 Angstrom.
+        size:  The size of the geometric object in Angstroms.
 
         file:  The name of the PDB file to create.
 
@@ -70,8 +70,8 @@
         There are four different types of residue within the PDB.  The pivot 
point is represented as
         as a single carbon atom of the residue 'PIV'.  The cone consists of 
numerous H atoms of the
         residue 'CON'.  The cone axis vector is presented as the residue 
'AXE' with one carbon atom
-        positioned at the pivot and the other 10 Angstrom away on the cone 
axis (modified by the
-        scale argument).  Finally, if Monte Carlo have been performed, there 
will be multiple 'MCC'
+        positioned at the pivot and the other x Angstroms away on the cone 
axis (set by the size
+        argument).  Finally, if Monte Carlo have been performed, there will 
be multiple 'MCC'
         residues representing the cone for each simulation, and multiple 
'MCA' residues representing
         the multiple cone axes.
 
@@ -88,15 +88,15 @@
         # Function intro text.
         if self.__relax__.interpreter.intro:
             text = sys.ps3 + "frame_order.cone_pdb("
-            text = text + "scale=" + `scale`
+            text = text + "size=" + `size`
             text = text + ", file=" + `file`
             text = text + ", dir=" + `dir`
             text = text + ", force=" + `force` + ")"
             print text
 
-        # Scaling.
-        if type(scale) != float and type(scale) != int:
-            raise RelaxNumError, ('scaling factor', scale)
+        # Object size.
+        if type(size) != float and type(size) != int:
+            raise RelaxNumError, ('geometric object size', size)
 
         # File name.
         if type(file) != str:
@@ -111,7 +111,7 @@
             raise RelaxBoolError, ('force flag', force)
 
         # Execute the functional code.
-        frame_order_obj.cone_pdb(scale=scale, file=file, dir=dir, 
force=force)
+        frame_order_obj.cone_pdb(size=size, file=file, dir=dir, force=force)
 
 
     def pivot(self, pivot=None):

Modified: branches/frame_order/specific_fns/frame_order.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order/specific_fns/frame_order.py?rev=9157&r1=9156&r2=9157&view=diff
==============================================================================
--- branches/frame_order/specific_fns/frame_order.py (original)
+++ branches/frame_order/specific_fns/frame_order.py Thu Jun 25 16:34:17 2009
@@ -271,12 +271,11 @@
         yield None
 
 
-    def cone_pdb(self, scale=1.0, file=None, dir=None, inc=20, force=False):
+    def cone_pdb(self, size=30.0, file=None, dir=None, inc=20, force=False):
         """Create a PDB file containing a geometric object representing the 
Frame Order cone models.
 
-        @param scale:       The size of the geometric object is equal to 10 
Angstroms multiplied by
-                            this scaling factor.
-        @type scale:        float
+        @param size:        The size of the geometric object in Angstroms.
+        @type size:         float
         @param inc:         The number of increments for the filling of the 
cone objects.
         @type inc:          int
         @param file:        The name of the PDB file to create.
@@ -324,17 +323,17 @@
 
         # Generate the axis vectors.
         print "\nGenerating the axis vectors."
-        res_num = generate_vector_residues(mol=mol, vector=cone_axis, 
atom_name='Axe', res_name_vect='AXE', sim_vectors=cone_axis_sim, res_num=2, 
origin=cdp.pivot, scale=scale)
+        res_num = generate_vector_residues(mol=mol, vector=cone_axis, 
atom_name='Axe', res_name_vect='AXE', sim_vectors=cone_axis_sim, res_num=2, 
origin=cdp.pivot, scale=size)
 
         # Generate the cone outer edge.
         print "\nGenerating the cone outer edge."
         edge_start_atom = mol.atom_num[-1]+1
-        cone_edge(mol=mol, res_name='CON', res_num=3+num_sim, 
apex=cdp.pivot, R=R, angle=cdp.theta_cone, length=10, inc=inc)
+        cone_edge(mol=mol, res_name='CON', res_num=3+num_sim, 
apex=cdp.pivot, R=R, angle=cdp.theta_cone, length=size, inc=inc)
 
         # Generate the cone cap, and stitch it to the cone edge.
         print "\nGenerating the cone cap."
         cone_start_atom = mol.atom_num[-1]+1
-        generate_vector_dist(mol=mol, res_name='CON', res_num=3+num_sim, 
centre=cdp.pivot, R=R, max_angle=cdp.theta_cone, scale=10, inc=inc)
+        generate_vector_dist(mol=mol, res_name='CON', res_num=3+num_sim, 
centre=cdp.pivot, R=R, max_angle=cdp.theta_cone, scale=size, inc=inc)
         stitch_cone_to_edge(mol=mol, cone_start=cone_start_atom, 
edge_start=edge_start_atom+1, max_angle=cdp.theta_cone, inc=inc)
 
         # Create the PDB file.




Related Messages


Powered by MHonArc, Updated Thu Jun 25 16:40:03 2009