Author: bugman
Date: Mon Feb 16 10:35:33 2015
New Revision: 27652
URL: http://svn.gna.org/viewcvs/relax?rev=27652&view=rev
Log:
The frame_order.distribute user function now warns when the maximum rotations
are reached.
Modified:
branches/frame_order_cleanup/lib/frame_order/simulation.py
Modified: branches/frame_order_cleanup/lib/frame_order/simulation.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/lib/frame_order/simulation.py?rev=27652&r1=27651&r2=27652&view=diff
==============================================================================
--- branches/frame_order_cleanup/lib/frame_order/simulation.py (original)
+++ branches/frame_order_cleanup/lib/frame_order/simulation.py Mon Feb 16
10:35:33 2015
@@ -26,9 +26,11 @@
from math import cos, pi, sin, sqrt
from numpy import dot, eye, float64, swapaxes, transpose, zeros
import sys
+from warnings import warn
# relax module imports.
from lib.errors import RelaxError
+from lib.warnings import RelaxWarning
from lib.frame_order.variables import MODEL_DOUBLE_ROTOR
from lib.geometry.angles import wrap_angles
from lib.geometry.rotations import axis_angle_to_R, R_random_hypersphere,
R_to_tilt_torsion, tilt_torsion_to_R
@@ -295,7 +297,11 @@
num += 1
# End.
- if current_state == total or num >= max_rotations:
+ if current_state == total:
+ break
+ if num >= max_rotations:
+ sys.stdout.write('\n')
+ warn(RelaxWarning("Maximum number of rotations encountered - the
distribution only contains %i states." % current_state))
break
# Loop over each state, or motional mode.
_______________________________________________
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