Author: bugman
Date: Thu Oct 2 13:28:26 2014
New Revision: 26134
URL: http://svn.gna.org/viewcvs/relax?rev=26134&view=rev
Log:
Merged revisions 26130 via svnmerge from
svn+ssh://[email protected]/svn/relax/trunk
........
r26130 | bugman | 2014-10-02 09:10:31 +0200 (Thu, 02 Oct 2014) | 6 lines
Added data checks and printouts to the structure.align user function.
The data checks are to prevent the user from attempting an alignment with
differently named
molecules, as this will not work.
........
Modified:
branches/frame_order_cleanup/ (props changed)
branches/frame_order_cleanup/pipe_control/structure/main.py
Propchange: branches/frame_order_cleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Oct 2 13:28:26 2014
@@ -1 +1 @@
-/trunk:1-26092,26095-26129
+/trunk:1-26133
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=26134&r1=26133&r2=26134&view=diff
==============================================================================
--- branches/frame_order_cleanup/pipe_control/structure/main.py (original)
+++ branches/frame_order_cleanup/pipe_control/structure/main.py Thu Oct 2
13:28:26 2014
@@ -145,10 +145,15 @@
models.append(None)
# Assemble the atomic coordinates of all structures.
+ print("Assembling all atomic coordinates:")
atom_ids = []
atom_pos = []
atom_elem = []
+ mol_ids = []
for pipe_index in range(len(pipes)):
+ # Printout.
+ print(" Data pipe: %s" % pipes[pipe_index])
+
# The data pipe object.
dp = get_pipe(pipes[pipe_index])
@@ -166,10 +171,14 @@
# Loop over the models.
for model in models[pipe_index]:
+ # Printout.
+ print(" Model: %s" % model)
+
# Extend the lists.
atom_ids.append([])
atom_pos.append({})
atom_elem.append({})
+ mol_ids.append([])
# Add all coordinates and elements.
for mol_name, res_num, res_name, atom_name, elem, pos in
dp.structure.atom_loop(selection=selection, model_num=model,
mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_name_flag=True,
pos_flag=True, element_flag=True):
@@ -179,6 +188,17 @@
atom_ids[-1].append(id)
atom_pos[-1][id] = pos[0]
atom_elem[-1][id] = elem
+
+ # Store the molecule name for later checks.
+ if mol_name not in mol_ids[-1]:
+ print(" Molecule: %s" % mol_name)
+ mol_ids[-1].append(mol_name)
+
+ # Check for the molecule names.
+ for mol_name in mol_ids[0]:
+ for i in range(len(mol_ids)):
+ if mol_name not in mol_ids[i]:
+ raise RelaxError("The molecule name '%s' cannot be found in
all data pipes." % mol_name)
# Set up the structures for the superimposition algorithm.
num = len(atom_ids)
_______________________________________________
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