Author: bugman
Date: Thu Nov 20 15:07:09 2014
New Revision: 26660
URL: http://svn.gna.org/viewcvs/relax?rev=26660&view=rev
Log:
Merged revisions 26656,26659 via svnmerge from
svn+ssh://[email protected]/svn/relax/trunk
........
r26656 | bugman | 2014-11-20 14:40:42 +0100 (Thu, 20 Nov 2014) | 6 lines
Python 2.5 fix for the align_tensor.display user function.
The new irreducible spherical tensor coefficient printout was failing as the
float.real variable was
introduced from Python 2.6 onwards.
........
r26659 | bugman | 2014-11-20 15:05:32 +0100 (Thu, 20 Nov 2014) | 7 lines
Shifted the structure checks into their own module.
This shifts the special check_structure Check object from
pipe_control.structure.main into the new
checks module. It allows the check to be performed by other modules in the
pipe_control.structure
package.
........
Added:
branches/frame_order_cleanup/pipe_control/structure/checks.py
- copied unchanged from r26659, trunk/pipe_control/structure/checks.py
Modified:
branches/frame_order_cleanup/ (props changed)
branches/frame_order_cleanup/pipe_control/align_tensor.py
branches/frame_order_cleanup/pipe_control/structure/__init__.py
branches/frame_order_cleanup/pipe_control/structure/main.py
Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Nov 20 15:07:09 2014
@@ -1 +1 @@
-/trunk:1-26653
+/trunk:1-26659
Modified: branches/frame_order_cleanup/pipe_control/align_tensor.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/align_tensor.py?rev=26660&r1=26659&r2=26660&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/align_tensor.py (original)
+++ branches/frame_order_cleanup/pipe_control/align_tensor.py Thu Nov 20
15:07:09 2014
@@ -347,7 +347,7 @@
# The parameters.
print("A-2 = %25.12e %25.12ei" % (data.Am2.real, data.Am2.imag))
print("A-1 = %25.12e %25.12ei" % (data.Am1.real, data.Am1.imag))
- print("A0 = %25.12e" % data.A0.real)
+ print("A0 = %25.12e" % data.A0)
print("A1 = %25.12e %25.12ei" % (data.A1.real, data.A1.imag))
print("A2 = %25.12e %25.12ei" % (data.A2.real, data.A2.imag))
Modified: branches/frame_order_cleanup/pipe_control/structure/__init__.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/structure/__init__.py?rev=26660&r1=26659&r2=26660&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/structure/__init__.py
(original)
+++ branches/frame_order_cleanup/pipe_control/structure/__init__.py Thu Nov
20 15:07:09 2014
@@ -36,6 +36,7 @@
"""
__all__ = [
+ 'checks',
'geometric',
'main',
'mass'
Modified: branches/frame_order_cleanup/pipe_control/structure/main.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/pipe_control/structure/main.py?rev=26660&r1=26659&r2=26660&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/structure/main.py (original)
+++ branches/frame_order_cleanup/pipe_control/structure/main.py Thu Nov 20
15:07:09 2014
@@ -30,7 +30,6 @@
# relax module imports.
from lib.check_types import is_float
-from lib.checks import Check
from lib.errors import RelaxError, RelaxFileError
from lib.io import get_file_path, open_write_file, write_data
from lib.selection import tokenise
@@ -45,6 +44,7 @@
from pipe_control.interatomic import interatomic_loop
from pipe_control.mol_res_spin import check_mol_res_spin_data, create_spin,
generate_spin_id_unique, linear_ave, return_spin, spin_loop
from pipe_control.pipes import cdp_name, check_pipe, get_pipe
+from pipe_control.structure.checks import check_structure
from pipe_control.structure.mass import pipe_centre_of_mass
from status import Status; status = Status()
from target_functions.ens_pivot_finder import Pivot_finder
@@ -249,36 +249,6 @@
# Increment the index.
i += 1
-
-
-def check_structure_func(pipe_name=None):
- """Test if structural data is present.
-
- @return: The initialised RelaxError object or nothing.
- @rtype: None or RelaxError instance
- """
-
- # Defaults.
- if pipe_name == None:
- pipe_name = cdp_name()
-
- # Get the data pipe.
- dp = get_pipe(pipe_name)
-
- # Test if the structure exists.
- if not hasattr(dp, 'structure'):
- return RelaxError("No structural data is present in the current data
pipe.")
-
- # Check for models:
- if not dp.structure.num_models():
- return RelaxError("The structural object in the current data pipe
contains no models.")
-
- # Check for molecules.
- if not dp.structure.num_molecules():
- return RelaxError("The structural object in the current data pipe
contains no molecules.")
-
-# Create the checking object.
-check_structure = Check(check_structure_func)
def connect_atom(index1=None, index2=None):
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits