mailr11275 - in /1.3: generic_fns/paramag.py prompt/paramag.py


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

Header


Content

Posted by edward on July 02, 2010 - 10:53:
Author: bugman
Date: Fri Jul  2 10:53:18 2010
New Revision: 11275

URL: http://svn.gna.org/viewcvs/relax?rev=11275&view=rev
Log:
The fix flag is now accepted by the paramag.centre() user function.


Modified:
    1.3/generic_fns/paramag.py
    1.3/prompt/paramag.py

Modified: 1.3/generic_fns/paramag.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/paramag.py?rev=11275&r1=11274&r2=11275&view=diff
==============================================================================
--- 1.3/generic_fns/paramag.py (original)
+++ 1.3/generic_fns/paramag.py Fri Jul  2 10:53:18 2010
@@ -37,7 +37,7 @@
 from relax_warnings import RelaxWarning
 
 
-def centre(pos=None, atom_id=None, pipe=None, verbosity=1, ave_pos=False, 
force=False):
+def centre(pos=None, atom_id=None, pipe=None, verbosity=1, fix=True, 
ave_pos=False, force=False):
     """Specify the atom in the loaded structure corresponding to the 
paramagnetic centre.
 
     @keyword pos:       The atomic position.  If set, the atom_id string 
will be ignored.
@@ -48,9 +48,12 @@
     @type pipe:         None or str
     @keyword verbosity: The amount of information to print out.  The bigger 
the number, the more information.
     @type verbosity:    int
+    @keyword fix:       A flag which if False causes the paramagnetic centre 
to be optimised during minimisation.
+    @type fix:          bool
     @keyword ave_pos:   A flag which if True causes the atomic positions 
from multiple models to be averaged.
     @type ave_pos:      bool
     @keyword force:     A flag which if True will cause the current 
paramagnetic centre to be overwritten.
+    @type force:        bool
     """
 
     # The data pipe.
@@ -124,3 +127,6 @@
         if verbosity:
             print("\nUsing all paramagnetic positions.")
         cdp.paramagnetic_centre = full_pos_list
+
+    # The fixed flag.
+    cdp.paramag_centre_fix = fix

Modified: 1.3/prompt/paramag.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/paramag.py?rev=11275&r1=11274&r2=11275&view=diff
==============================================================================
--- 1.3/prompt/paramag.py (original)
+++ 1.3/prompt/paramag.py Fri Jul  2 10:53:18 2010
@@ -34,7 +34,7 @@
 class PCS(User_fn_class):
     """Class for handling paramagnetic information."""
 
-    def centre(self, pos=None, atom_id=None, pipe=None, verbosity=1, 
ave_pos=True, force=False):
+    def centre(self, pos=None, atom_id=None, pipe=None, verbosity=1, 
fix=True, ave_pos=True, force=False):
         """Specify which atom is the paramagnetic centre.
 
         Keyword Arguments
@@ -47,6 +47,8 @@
         pipe:  The data pipe containing the structures to extract the centre 
from.
 
         verbosity:  The amount of information to print out.
+
+        fix:  A flag specifying if the paramagnetic centre should be fixed 
during optimisation.
 
         ave_pos:  A flag specifying if the position of the atom is to be 
averaged across all models.
 
@@ -89,6 +91,10 @@
 
         relax> pcs.centre([0.136, 12.543, 4.356])
         relax> pcs.centre(pos=[0.136, 12.543, 4.356])
+
+        To find an unknown paramagnetic centre, type:
+
+        relax> pcs.centre(fix=False)
         """
 
         # Function intro text.
@@ -98,6 +104,7 @@
             text = text + ", atom_id=" + repr(atom_id)
             text = text + ", pipe=" + repr(pipe)
             text = text + ", verbosity=" + repr(verbosity)
+            text = text + ", fix=" + repr(fix)
             text = text + ", ave_pos=" + repr(ave_pos)
             text = text + ", force=" + repr(force) + ")"
             print(text)
@@ -107,8 +114,9 @@
         arg_check.is_str(atom_id, 'atom ID string', can_be_none=True)
         arg_check.is_str(pipe, 'data pipe', can_be_none=True)
         arg_check.is_int(verbosity, 'verbosity level')
+        arg_check.is_bool(fix, 'fix flag')
         arg_check.is_bool(ave_pos, 'average position flag')
         arg_check.is_bool(force, 'force flag')
 
         # Execute the functional code.
-        paramag.centre(pos=pos, atom_id=atom_id, pipe=pipe, 
verbosity=verbosity, ave_pos=ave_pos, force=force)
+        paramag.centre(pos=pos, atom_id=atom_id, pipe=pipe, 
verbosity=verbosity, fix=fix, ave_pos=ave_pos, force=force)




Related Messages


Powered by MHonArc, Updated Fri Jul 02 11:00:02 2010