def save_state(): """Save the program state, for debugging purposes.""" # relax data store singleton import. Must be done here! try: from data_store import Relax_data_store ds = Relax_data_store() # Ok, this is not relax so don't do anything! except ImportError: return # Append the date and time to the save file. now = time.localtime() file_name = "relax_state_%i%02i%02i_%02i%02i%02i" % ( now[0], now[1], now[2], now[3], now[4], now[5]) # Open the file for writing. if bz2: sys.stderr.write( "\nStoring the relax state in the file '%s.bz2'.\n\n" % file_name) file = BZ2File(file_name + '.bz2', 'w') else: sys.stderr.write("\nStoring the relax state in the file '%s'.\n\n" % file_name) file = open(file_name, 'w') # Pickle the data class and write it to file pickle.dump(ds, file, 1) # Close the file. file.close()
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """Script for testing the fitting an alignment tensor to RDCs or PCSs.""" # Python module imports. from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Path of the alignment data and structure. DATA_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'align_data'+sep+'CaM' STRUCT_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' # Create the data pipe. self._execute_uf('rdc', 'N-state', uf_name='pipe.create') # Set the mode, if not specified by the system test. if not hasattr(ds, 'mode'): ds.mode = 'all' # The data to use.
# GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """Script for performing a very minimal model-free analysis using the OMP relaxation data.""" # Python module imports. from os import sep # relax module imports. from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Path of the relaxation data. DATA_PATH = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'model_free' + sep + 'OMP' # Mini subset of local tm and model-free data pipes. LOCAL_TM_MODELS = ['tm0', 'tm1', 'tm2'] MF_MODELS = ['m0', 'm1', 'm2'] # The bond length, CSA values, heteronucleus type, and proton type. BOND_LENGTH = 1.02 * 1e-10 CSA = -172 * 1e-6 HETNUC = '15N' PROTON = '1H'