Author: bugman Date: Fri Sep 19 11:55:07 2014 New Revision: 25918 URL: http://svn.gna.org/viewcvs/relax?rev=25918&view=rev Log: The frame order minimise_setup_atomic_pos() function now accepts the verbosity argument. This is used to silence the warnings in user functions such as frame_order.sobol_setup. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py?rev=25918&r1=25917&r2=25918&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/optimisation.py Fri Sep 19 11:55:07 2014 @@ -234,11 +234,13 @@ return list(row) -def minimise_setup_atomic_pos(sim_index=None): +def minimise_setup_atomic_pos(sim_index=None, verbosity=1): """Set up the atomic position data structures for optimisation using PCSs and PREs as base data sets. @keyword sim_index: The index of the simulation to optimise. This should be None if normal optimisation is desired. @type sim_index: None or int + @keyword verbosity: If set to 1 or higher, then printouts and warnings will be active. + @type verbosity: int @return: The atomic positions (the first index is the spins, the second is the structures, and the third is the atomic coordinates) and the paramagnetic centre. @rtype: numpy rank-3 array, numpy rank-1 array. """ @@ -286,7 +288,7 @@ atomic_pos.append(ave_pos) # Give a warning about the atomic position averaging. - if len(ave_warning_spin_ids): + if verbosity and len(ave_warning_spin_ids): warn(RelaxWarning("Averaging the %s atomic positions for the PCS for the spins '%s'." % (ave_warning_num, ave_warning_spin_ids))) # Convert to numpy objects. @@ -796,7 +798,7 @@ # Get the atomic_positions. atomic_pos, paramag_centre = None, None if 'pcs' in data_types or 'pre' in data_types: - atomic_pos, paramag_centre = minimise_setup_atomic_pos(sim_index=sim_index) + atomic_pos, paramag_centre = minimise_setup_atomic_pos(sim_index=sim_index, verbosity=verbosity) # The fixed pivot point. pivot = None