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()
# Script for testing the reading and writing of BMRB files. # 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() # Missing temp file (allow this script to run outside of the system test framework). state_file = 'devnull' if not hasattr(ds, 'tmpfile'): stand_alone = True ds.tmpfile = 'temp_bmrb' ds.version = '3.1' state_file = 'temp_bmrb_state' # Create the data pipe. self._execute_uf(uf_name='pipe.create', pipe_name='results', pipe_type='mf') # Read the results. self._execute_uf(uf_name='results.read', file='final_results_trunc_1.3_v2', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP') # Speed these tests up a bit. self._execute_uf(uf_name='residue.delete', res_id=':15-200') # Play with the data. self._execute_uf(uf_name='deselect.all') self._execute_uf(uf_name='select.spin', spin_id=':9@N') self._execute_uf(uf_name='select.spin', spin_id=':10@N')
# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import getcwd, sep # relax module imports. from data_store import Relax_data_store ds = Relax_data_store() ######################################### #### Setup # The pipe names. if not (hasattr(ds, 'pipe_name') and hasattr(ds, 'pipe_bundle') and hasattr(ds, 'pipe_type')): # Set pipe name, bundle and type. ds.pipe_name = 'base pipe' ds.pipe_bundle = 'relax_disp' ds.pipe_type = 'relax_disp' # The data path if not hasattr(ds, 'data_path'): ds.data_path = getcwd()
# Script for checking the free rotor pseudo-ellipse frame order model. # Python module imports. from numpy import array, float64 from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from lib.geometry.rotations import R_to_euler_zyz from status import Status; status = Status() def get_angle(index, incs=None, deg=False): """Return the angle corresponding to the incrementation index.""" # The angle of one increment. inc_angle = pi / incs # The angle of the increment. angle = inc_angle * (index+1) # Return. if deg: return angle / (2*pi) * 360 else: return angle # Init. INC = 18 EIG_FRAME = array([[ 2, -1, 2],
"""Script for optimising the 'MQ NS 2-site' model. This performs the analysis of: Remco Sprangers, Anna Gribun, Peter M. Hwang, Walid A. Houry, and Lewis E. Kay (2005) Quantitative NMR spectroscopy of supramolecular complexes: Dynamic side pores in ClpP are important for product release, PNAS, 102 (46), 16678-16683. (doi: http://dx.doi.org/10.1073/pnas.0507370102) """ # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The dispersion models. if not hasattr(ds, 'models'): ds.models = ['R2eff', 'No Rex', 'NS MMQ 2-site'] # The grid search size (the number of increments per dimension). GRID_INC = 4 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3 # The temporary directory, if needed. if not hasattr(ds, 'tmpdir'):
# Script for model-free analysis using the program 'Modelfree4'. # 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() # Missing temp directory (allow this script to run outside of the system test framework). if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp_script' # Path of the relaxation data. DATA_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP' def exec_stage_1(pipes): """Stage 1 function. Initial model-free minimisation. """ # Loop over the data pipes. for name in pipes: # Create the data pipe. print("\n\n# " + name + " #") pipe.create(name, 'mf') # Copy the sequence.
# Script for checking the parametric restriction of the free rotor pseudo-ellipse to the free rotor isotropic cone frame order model. # Python module imports. from numpy import array, cross, float64, zeros from numpy.linalg import norm from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from lib.geometry.rotations import R_to_euler_zyz from status import Status; status = Status() def get_angle(index, incs=None, deg=False): """Return the angle corresponding to the incrementation index.""" # The angle of one increment. inc_angle = pi / incs # The angle of the increment. angle = inc_angle * (index+1) # Return. if deg: return angle / (2*pi) * 360 else: return angle # Init. INC = 18
# 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 CPMG relaxation dispersion curve fitting using Dr. Flemming Hansen's data from http://dx.doi.org/10.1021/jp074793o.""" # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from lib.dispersion.variables import MODEL_NOREX, MODEL_R2EFF from status import Status; status = Status() # The dispersion models. MODELS = [MODEL_R2EFF, MODEL_NOREX] if hasattr(ds, 'models'): MODELS = ds.models # The temporary directory, if needed. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # The numeric flag. if not hasattr(ds, 'numeric_only'):
# # # 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. """Optimise the R1rho on-resonance synthetic data using the DPL94 model.""" # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Analysis variables. ##################### # The dispersion models. if not hasattr(ds, 'models'): ds.models = ['R2eff', 'TP02'] # The grid search size (the number of increments per dimension). GRID_INC = 4 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3
# 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 loading of phthalic acid NOEs from a generically formatted file.""" # 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() # Add a date pipe if one doesn't already exist. if not len(ds): self._execute_uf(uf_name='pipe.create', pipe_name='test', pipe_type='N-state') # NOE restraint file. if not hasattr(ds, 'file_name'): ds.file_name = 'phthalic_acid' # Path of the relaxation data. DATA_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep # Pseudo-atoms.
# Script for relaxation curve fitting. # 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() # Missing intensity type (allow this script to run outside of the system test framework). if not hasattr(ds, 'int_type'): ds.int_type = 'height' # Create the data pipe. pipe.create('rx', 'relax_fit') # The path to the data files. data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting'+sep+'inversion_recovery' # Load the sequence. sequence.read('Ap4Aase.seq', dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, res_name_col=2) # Name the spins so they can be matched to the assignments. spin.name(name='N') # Spectrum names. names = [ 'T1_inv-recov_200_ms', 'T1_inv-recov_450_ms',
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import getcwd, sep import re # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from lib.dispersion.variables import MODEL_R2EFF ######################################### #### Setup # The data path if not hasattr(ds, 'data_path'): ds.data_path = getcwd() # The models to analyse. if not hasattr(ds, 'models'): ds.models = [MODEL_R2EFF] # The number of increments per parameter, to split up the search interval in grid search. if not hasattr(ds, 'grid_inc'):
# relax script for regenerating the 'basic_single_pipe.bz2' saved state. This is for when the saved # state becomes incompatible with relax. # The relax data store. from data_store import Relax_data_store; ds = Relax_data_store() # Add a data pipe to the data store. ds.add(pipe_name='orig', pipe_type='mf') # Add a single object to the 'orig' data pipe. ds['orig'].x = 1 # Add a single object to the storage object. ds.y = 'Hello' # Save the state. state.save('basic_single_pipe', force=True)
"""Script for testing diffusion tensor optimisation.""" # Python module imports. from numpy import array, float64 from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Stand alone operation. if not hasattr(ds, 'diff_type'): ds.diff_type = 'spheroid' # A data pipe. pipe.create('diff_opt', 'mf') # Path of the files. path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'+sep+ds.diff_type # Load the sequence. sequence.read('NOE.500.out', dir=path, res_num_col=1) # Load a PDB file. structure.read_pdb('uniform.pdb', dir=path) # Set the spin names. spin.name(name='N') # Load the relaxation data.
# 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 diffusion tensor optimisation.""" # 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() # The frequency list. FRQ = [500, 600, 700, 800] # Stand alone operation. if not hasattr(ds, 'diff_type'): ds.diff_type = 'ellipsoid' if not hasattr(ds, 'diff_dir'): ds.diff_dir = 'ellipsoid' # A data pipe. pipe.create('back_calc', 'mf')
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import getcwd, sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store ds = Relax_data_store() from lib.dispersion.variables import MODEL_NOREX_R1RHO_FIT_R1, MODEL_DPL94_FIT_R1, MODEL_TP02_FIT_R1, MODEL_TAP03_FIT_R1, MODEL_MP05_FIT_R1 ######################################### #### Setup # The pipe names. if not (hasattr(ds, 'pipe_name') and hasattr(ds, 'pipe_bundle') and hasattr(ds, 'pipe_type')): # Set pipe name, bundle and type. ds.pipe_name = 'base pipe' ds.pipe_bundle = 'relax_disp' ds.pipe_type = 'relax_disp' # The data path if not hasattr(ds, 'data_path'): ds.data_path = getcwd()
"""Script for testing out the N-state model alignment tensor optimisation using pyrotarctic anhydride. This is for testing both the optimisation of long range RDCs (2J and 3J) to pseudo-atoms and for testing the absolute T and absolute J data type. """ # Python module imports. from os import sep # relax imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Setup for stand-alone operation. if not hasattr(ds, 'abs_data'): ds.abs_data = 'mix' # Path of the files. str_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'align_data'+sep+'pyrotartaric_anhydride' # Create the data pipe. self._execute_uf(uf_name='pipe.create', pipe_name='pyrotartaric anhydride', pipe_type='N-state') # Load the structure. self._execute_uf(uf_name='structure.read_pdb', file='pyrotartaric_anhydride.pdb', dir=str_path) # Set up the 13C and 1H spins information. self._execute_uf(uf_name='structure.load_spins', spin_id='@C*', ave_pos=False) self._execute_uf(uf_name='structure.load_spins', spin_id='@H*', ave_pos=False)
"""Script for testing diffusion tensor optimisation.""" # 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() # The frequency list. FRQ = [500, 600, 700, 800] # Stand alone operation. if not hasattr(ds, 'diff_type'): ds.diff_type = 'ellipsoid' # A data pipe. pipe.create('back_calc', 'mf') # Path of the files. path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'+sep+ds.diff_type # Load the sequence. sequence.read('NOE.500.out', dir=path, res_num_col=1) # Load the original relaxation data. for i in range(len(FRQ)): relax_data.read(ri_id='R1_%i'%FRQ[i], ri_type='R1', frq=FRQ[i]*1e6, file='R1.%s.out'%str(int(FRQ[i])), dir=path, res_num_col=1, data_col=2, error_col=3) relax_data.read(ri_id='R2_%i'%FRQ[i], ri_type='R2', frq=FRQ[i]*1e6, file='R2.%s.out'%str(int(FRQ[i])), dir=path, res_num_col=1, data_col=2, error_col=3) relax_data.read(ri_id='NOE_%i'%FRQ[i], ri_type='NOE', frq=FRQ[i]*1e6, file='NOE.%s.out'%str(int(FRQ[i])), dir=path, res_num_col=1, data_col=2, error_col=3)
# Script for CPMG relaxation dispersion curve fitting using Dr. Flemming Hansen's data from http://dx.doi.org/10.1021/jp074793o. # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # The dispersion models. MODELS = ['LM63'] if hasattr(ds, 'models'): MODELS = ds.models # The temporary directory, if needed. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # The numeric flag. if not hasattr(ds, 'numeric_only'): ds.numeric_only = False # The grid search size (the number of increments per dimension). GRID_INC = 6 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """Script for catching bug #20464, the failure due to missing relaxation data (https://web.archive.org/web/https://gna.org/bugs/?20464).""" # Python module imports. from os import sep from tempfile import mkdtemp # relax module imports. from auto_analyses.dauvergne_protocol import dAuvergne_protocol from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Analysis variables. ##################### # The diffusion model. DIFF_MODEL = 'final' # The model-free models. Do not change these unless absolutely necessary, the protocol is likely to fail if these are changed. MF_MODELS = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm9'] LOCAL_TM_MODELS = ['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm9'] # The grid search size (the number of increments per dimension).
and build the C module with: gcc -o target_functions/c_chi2.os -c -I/data/python/pydebug/include/python2.7/ -fPIC target_functions/c_chi2.c gcc -o target_functions/exponential.os -c -I/data/python/pydebug/include/python2.7/ -fPIC target_functions/exponential.c gcc -o target_functions/relax_fit.os -c -I/data/python/pydebug/include/python2.7/ -fPIC target_functions/relax_fit.c gcc -o target_functions/relax_fit.so -shared target_functions/c_chi2.os target_functions/exponential.os target_functions/relax_fit.os """ # Python module imports. from os import sep import sys # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Missing intensity type (allow this script to run outside of the system test framework). if not hasattr(ds, 'int_type'): ds.int_type = 'height' # Missing temporary directory. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # Create the data pipe. pipe.create('rx', 'relax_fit') # The path to the data files.
# 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. """Optimise the R1rho on-resonance synthetic data using the M61 model.""" # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Analysis variables. ##################### # The dispersion models. MODELS = ['R2eff', 'No Rex', 'M61'] # The grid search size (the number of increments per dimension). GRID_INC = None # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3
# 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/>. # # # ############################################################################### """Script for relaxation curve fitting.""" # 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() # Missing temporary directory. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # Create the 'rx' data pipe. pipe.create('rx', 'relax_fit') # The path to the data files. data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting'+sep+'saturation_recovery' # Load the sequence. spin.create(spin_name='H', res_name='G', res_num=17)
# # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import getcwd, sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() ######################################### #### Setup # The pipe names. if not (hasattr(ds, 'pipe_name') and hasattr(ds, 'pipe_bundle') and hasattr(ds, 'pipe_type')): # Set pipe name, bundle and type. ds.pipe_name = 'base pipe' ds.pipe_bundle = 'relax_disp' ds.pipe_type = 'relax_disp' # The data path if not hasattr(ds, 'data_path'): ds.data_path = getcwd() #########################################
# Module docstring. """Script for testing translation and rotation in the frame order analyses. This script should be run from the directory where it is found with the commands: $ ../../../../relax full_analysis.py """ # Python module imports. from numpy import array, float64 from os import sep # relax module imports. from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # The data path. PATH = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'frame_order' + sep + 'displacements' # Create the data pipe. self._execute_uf(uf_name='pipe.create', pipe_name='rigid test', pipe_type='frame order') # Read the structures. self._execute_uf(uf_name='structure.read_pdb', file='displaced.pdb', dir=PATH,
############################################################################### # Module docstring. """Script for optimising the 'MQ NS 2-site' model. This performs the analysis of: Remco Sprangers, Anna Gribun, Peter M. Hwang, Walid A. Houry, and Lewis E. Kay (2005) Quantitative NMR spectroscopy of supramolecular complexes: Dynamic side pores in ClpP are important for product release, PNAS, 102 (46), 16678-16683. (doi: http://dx.doi.org/10.1073/pnas.0507370102) """ # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The dispersion models. if not hasattr(ds, 'models'): ds.models = ['R2eff', 'No Rex', 'NS MMQ 2-site'] # The grid search size (the number of increments per dimension). GRID_INC = 4 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3
# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import sep # relax imports. from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Missing temp directory (allow this script to run outside of the system test framework). if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp_script' # Create a data pipe. pipe.create('pca test', 'N-state') # Load the structures. path = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'structures' + sep + 'pca' structure.read_pdb('distribution.pdb', dir=path, read_mol=1,
# 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 determining populations for lactose conformations using RDCs and PCSs.""" # Python module imports. from os import sep # relax imports. from data_store import Relax_data_store ds = Relax_data_store() from specific_analyses.api import return_api from status import Status status = Status() # Path of the files. str_path = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'structures' + sep + 'lactose' data_path = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'align_data' # Create the data pipe. self._execute_uf('lactose', 'N-state', uf_name='pipe.create') # The population model for free operation of this script. if not hasattr(ds, 'model'): ds.model = 'population'
# 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'
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # # ############################################################################### # Module docstring. """Script for testing out the N-state model alignment tensor optimisation using pyrotarctic anhydride. This is for testing both the optimisation of long range RDCs (2J and 3J) to pseudo-atoms and for testing the absolute T and absolute J data type. """ # Python module imports. from os import sep # relax imports. from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Setup for stand-alone operation. if not hasattr(ds, 'abs_data'): ds.abs_data = 'mix' # Path of the files. str_path = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'structures' data_path = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'align_data' + sep + 'pyrotartaric_anhydride' # Create the data pipe. self._execute_uf(uf_name='pipe.create', pipe_name='pyrotartaric anhydride', pipe_type='N-state')
# 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 of the paramagnetic centre of the 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(uf_name='pipe.create', pipe_name='para_centre', pipe_type='N-state') # Set the mode, if not specified by the system test. if not hasattr(ds, 'mode'): ds.mode = 'all'
# relax script for regenerating the 'peak_heights_T2_ncyc1.bz2' saved state. This is necessary when # the saved state becomes incompatible with relax during development. # Python module imports. from os import sep # The relax data store. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Add a data pipe to the data store. ds.add(pipe_name='rx', pipe_type='relax_fit') # Load the Lupin Ap4Aase sequence. sequence.read(file="Ap4Aase.seq", dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, res_name_col=2) # Name the spins so they can be matched to the assignments. spin.name(name='N') # Read the peak heights. spectrum.read_intensities(file="T2_ncyc1_ave.list", dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting', spectrum_id='0.0176') # Save the state. state.save('basic_heights_T2_ncyc1', force=True)
"""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. if hasattr(ds, 'rand') and ds.rand: rdc_file = 'synth_rdc_rand' pcs_file = 'synth_pcs_rand' else: rdc_file = 'synth_rdc' pcs_file = 'synth_pcs' # Load the CaM structure. self._execute_uf(uf_name='structure.read_pdb', file='bax_C_1J7P_N_H_Ca', dir=STRUCT_PATH)
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Script for calculating synthetics CPMG data. # Python module imports. from math import sqrt # relax module imports. from lib.io import open_write_file from data_store import Relax_data_store; ds = Relax_data_store() from pipe_control.mol_res_spin import return_spin from specific_analyses.relax_disp.data import generate_r20_key, loop_exp_frq, loop_offset_point from specific_analyses.relax_disp import optimisation from status import Status; status = Status() # The variables already defined in relax. from lib.dispersion.variables import EXP_TYPE_CPMG_SQ, MODEL_PARAMS # Analytical from lib.dispersion.variables import MODEL_CR72, MODEL_IT99, MODEL_TSMFK01, MODEL_B14 # Analytical full from lib.dispersion.variables import MODEL_CR72_FULL, MODEL_B14_FULL # NS : Numerical Solution from lib.dispersion.variables import MODEL_NS_CPMG_2SITE_3D, MODEL_NS_CPMG_2SITE_STAR, MODEL_NS_CPMG_2SITE_EXPANDED # NS full from lib.dispersion.variables import MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_STAR_FULL
# 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 calculating R2eff values.""" # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The dispersion models. MODELS = ['R2eff'] # The grid search size (the number of increments per dimension). GRID_INC = 5 # The number of Monte Carlo simulations to be used for the error analyses. MC_NUM = 3
"""Script for testing diffusion tensor optimisation.""" # Python module imports. from numpy import array, float64 from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Stand alone operation. if not hasattr(ds, 'diff_type'): ds.diff_type = 'spheroid' if not hasattr(ds, 'diff_dir'): ds.diff_dir = ds.diff_type # A data pipe. pipe.create('diff_opt', 'mf') # Path of the files. path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'+sep+ds.diff_dir # Load the sequence. sequence.read('NOE.500.out', dir=path, res_num_col=1) # Load a PDB file. structure.read_pdb('uniform.pdb', dir=path) # Set the spin names. spin.name(name='N')
# # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import sep # relax imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Missing temp directory (allow this script to run outside of the system test framework). if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp_script' # Create a data pipe. pipe.create('pca test', 'N-state') # Load the structures. path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures'+sep+'pca' structure.read_pdb('distribution.pdb', dir=path, read_mol=1, set_mol_name='CaM A') structure.read_pdb('distribution.pdb', dir=path, read_mol=4, set_mol_name='CaM A', merge=True)
# Script for determining populations for lactose conformations using RDCs and PCSs. # Python module imports. from os import sep # relax imports. from data_store import Relax_data_store; ds = Relax_data_store() from specific_analyses.setup import n_state_model_obj from status import Status; status = Status() # Path of the files. str_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures'+sep+'lactose' data_path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'align_data' # Create the data pipe. self._execute_uf('lactose', 'N-state', uf_name='pipe.create') # The population model for free operation of this script. if not hasattr(ds, 'model'): ds.model = 'population' # Load the structures. NUM_STR = 4 for i in range(NUM_STR): self._execute_uf(uf_name='structure.read_pdb', file='lactose_MCMM4_S1_'+repr(i+1), dir=str_path, set_model_num=i+1, set_mol_name='lactose_MCMM4_S1') # Set up the 13C and 1H spins information. self._execute_uf(uf_name='structure.load_spins', spin_id=':UNK@C*', ave_pos=False) self._execute_uf(uf_name='structure.load_spins', spin_id=':UNK@H*', ave_pos=False) self._execute_uf(uf_name='spin.isotope', isotope='13C', spin_id='@C*')
# Module docstring. """Script for performing a full relaxation dispersion analysis using CPMG-type data. This uses Dr. Flemming Hansen's data from http://dx.doi.org/10.1021/jp074793o. This is here to test the ./sample_scripts/relax_disp/cpmg_analysis.py sample script. The differences between the two files should be minimal. """ # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Analysis variables. ##################### # The dispersion models. MODELS = ['R2eff'] # The grid search size (the number of increments per dimension). GRID_INC = 3 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3
# Script for catching bug #20464, the failure due to missing relaxation data (https://gna.org/bugs/?20464). # Python module imports. from os import sep from tempfile import mkdtemp # relax module imports. from auto_analyses.dauvergne_protocol import dAuvergne_protocol from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The diffusion model. DIFF_MODEL = 'final' # The model-free models. Do not change these unless absolutely necessary, the protocol is likely to fail if these are changed. MF_MODELS = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm9'] LOCAL_TM_MODELS = ['tm0', 'tm1', 'tm2', 'tm3', 'tm4', 'tm5', 'tm9'] # The grid search size (the number of increments per dimension). GRID_INC = 4 # The optimisation technique. MIN_ALGOR = 'newton' # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3
# # # 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 catching bug #20464, the failure due to missing relaxation data (https://web.archive.org/web/https://gna.org/bugs/?20464).""" # Python module imports. from os import sep from tempfile import mkdtemp # relax module imports. from auto_analyses.dauvergne_protocol import dAuvergne_protocol from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # The diffusion model. DIFF_MODEL = 'local_tm' # The model-free models. Do not change these unless absolutely necessary, the protocol is likely to fail if these are changed. MF_MODELS = ['m0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'm9'] LOCAL_TM_MODELS = ['tm0', 'tm4', 'tm9'] # The grid search size (the number of increments per dimension). GRID_INC = 3 # The optimisation technique. MIN_ALGOR = 'newton'
# 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 reading and writing of BMRB files.""" # 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() # Missing temp file (allow this script to run outside of the system test framework). state_file = 'devnull' if not hasattr(ds, 'tmpfile'): stand_alone = True ds.tmpfile = 'temp_bmrb' ds.version = '3.1' state_file = 'temp_bmrb_state' # Create the data pipe. self._execute_uf(uf_name='pipe.create', pipe_name='results', pipe_type='mf') # Read the results.
"""Script for testing diffusion tensor optimisation.""" # 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() # The frequency list. FRQ = [500, 600, 700, 800] # Stand alone operation. if not hasattr(ds, 'diff_type'): ds.diff_type = 'ellipsoid' if not hasattr(ds, 'diff_dir'): ds.diff_dir = 'ellipsoid' # A data pipe. pipe.create('back_calc', 'mf') # Path of the files. path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'diffusion_tensor'+sep+ds.diff_dir # Load the sequence. sequence.read('NOE.500.out', dir=path, res_num_col=1) # Load the original relaxation data. for i in range(len(FRQ)): relax_data.read(ri_id='R1_%i'%FRQ[i], ri_type='R1', frq=FRQ[i]*1e6, file='R1.%s.out'%str(int(FRQ[i])), dir=path, res_num_col=1, data_col=2, error_col=3)
# Optimise the R1rho on-resonance synthetic data using the M61 model. # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The dispersion models. MODELS = ['R2eff', 'No Rex', 'M61'] # The grid search size (the number of increments per dimension). GRID_INC = 5 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3 # Fixed relaxation time period flag. if not hasattr(ds, 'fixed'): ds.fixed = True # Set up the data pipe. #######################
# # # 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 relaxation curve fitting.""" # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_fit import Relax_fit from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # Missing temporary directory. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # The path to the data files. DATA_PATH = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'curve_fitting' + sep + 'bug_23244_Iinf_graph' # Create the 'test' data pipe. pipe.create(pipe_name='test', bundle='R1 analysis', pipe_type='relax_fit') # Set up the sequence. spin.create(res_num=51, spin_name='CG2')
# Script for checking the free rotor frame order model. # Python module imports. from numpy import array, float64 from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from lib.geometry.coord_transform import cartesian_to_spherical from status import Status; status = Status() # Generate 3 orthogonal vectors. vect_z = array([2, 1, 3], float64) r, theta, phi = cartesian_to_spherical(vect_z) # Load the tensors. self._execute_uf(uf_name='script', file=status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'tensors'+sep+'free_rotor_axis2_1_3_rot_tensors.py') # Data init. cdp.ave_pos_beta = 0.5 cdp.ave_pos_gamma = 0.2 cdp.axis_theta = theta cdp.axis_phi = phi # Select the Frame Order model. self._execute_uf(uf_name='frame_order.select_model', model='free rotor') # Set the reference domain. self._execute_uf(uf_name='frame_order.ref_domain', ref='full')
# 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. """relax script for regenerating the 'peak_heights_T2_ncyc1.bz2' saved state. This is necessary when the saved state becomes incompatible with relax during development. """ # Python module imports. from os import sep # The relax data store. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Add a data pipe to the data store. ds.add(pipe_name='rx', pipe_type='relax_fit') # Load the Lupin Ap4Aase sequence. sequence.read(file="Ap4Aase.seq", dir=status.install_path + sep+'test_suite'+sep+'shared_data', res_num_col=1, res_name_col=2) # Name the spins so they can be matched to the assignments. spin.name(name='N') # Read the peak heights. spectrum.read_intensities(file="T2_ncyc1_ave.list", dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'curve_fitting', spectrum_id='0.0176')
# 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/>. # # # ############################################################################### # Python module imports. from os import getcwd, sep import re # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store ds = Relax_data_store() from lib.dispersion.variables import MODEL_R2EFF ######################################### #### Setup # The data path if not hasattr(ds, 'data_path'): ds.data_path = getcwd() # The models to analyse. if not hasattr(ds, 'models'): ds.models = [MODEL_R2EFF] # The number of increments per parameter, to split up the search interval in grid search. if not hasattr(ds, 'grid_inc'): ds.grid_inc = 21
# # ############################################################################### """Script for testing translation and rotation in the frame order analyses. This script should be run from the directory where it is found with the commands: $ ../../../../relax full_analysis.py """ # Python module imports. from numpy import array, float64 from os import sep # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # The data path. PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'frame_order'+sep+'displacements' # Create the data pipe. self._execute_uf(uf_name='pipe.create', pipe_name='rigid test', pipe_type='frame order') # Read the structures. self._execute_uf(uf_name='structure.read_pdb', file='displaced.pdb', dir=PATH, set_mol_name='fancy_mol') # Set up the 15N and 1H spins. self._execute_uf(uf_name='structure.load_spins')
# Optimise the R1rho on-resonance synthetic data using the DPL94 model. # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The dispersion models. if not hasattr(ds, 'models'): ds.models = ['R2eff', 'TP02'] # The grid search size (the number of increments per dimension). GRID_INC = 4 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 1 # Set up the data pipe. ####################### # The results directory. if not hasattr(ds, 'tmpdir'):
# 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 relaxation curve fitting.""" # 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() # Missing intensity type (allow this script to run outside of the system test framework). if not hasattr(ds, 'int_type'): ds.int_type = 'height' # Missing temporary directory. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # Create the data pipe. pipe.create('rx', 'relax_fit') # The path to the data files.
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from math import pi from os import sep from tempfile import mkdtemp # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() import dep_check from pipe_control.interatomic import interatomic_loop from pipe_control.mol_res_spin import spin_loop from lib.io import test_binary from status import Status; status = Status() from test_suite.system_tests.base_classes import SystemTestCase class Dasha(SystemTestCase): """Class for testing various aspects specific to model-free analysis using the program 'Dasha'.""" def __init__(self, methodName='runTest'): """Skip the tests if the subprocess module is not available (Python 2.3 and earlier). @keyword methodName: The name of the test.
# but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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. """relax script for regenerating the 'basic_single_pipe.bz2' saved state. This is for when the saved state becomes incompatible with relax. """ # The relax data store. from data_store import Relax_data_store ds = Relax_data_store() # Add a data pipe to the data store. ds.add(pipe_name='orig', pipe_type='mf') # Add a single object to the 'orig' data pipe. ds['orig'].x = 1 # Add a single object to the storage object. ds.y = 'Hello' # Save the state. state.save('basic_single_pipe', force=True)
# This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # 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/>. # # # ############################################################################### # Python module imports. from os import getcwd, sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from lib.dispersion.variables import MODEL_NOREX_R1RHO_FIT_R1, MODEL_DPL94_FIT_R1, MODEL_TP02_FIT_R1, MODEL_TAP03_FIT_R1, MODEL_MP05_FIT_R1 from pipe_control.mol_res_spin import spin_loop ######################################### #### Setup # The pipe names. if not (hasattr(ds, 'pipe_name') and hasattr(ds, 'pipe_bundle') and hasattr(ds, 'pipe_type') and hasattr(ds, 'pipe_bundle_cluster')): # Set pipe name, bundle and type. ds.pipe_name = 'base pipe' ds.pipe_bundle = 'relax_disp' ds.pipe_type = 'relax_disp' ds.pipe_bundle_cluster = 'cluster' # The data path if not hasattr(ds, 'data_path'):
"""Script for testing the loading of phthalic acid NOEs from a generically formatted file.""" # 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() # Add a date pipe if one doesn't already exist. if not ds.keys(): self._execute_uf(uf_name='pipe.create', pipe_name='test', pipe_type='N-state') # NOE restraint file. if not hasattr(ds, 'file_name'): ds.file_name = 'phthalic_acid' # Path of the relaxation data. DATA_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep # Pseudo-atoms. PSEUDO = [ ['Q7', ['@H16', '@H17', '@H18']], ['Q9', ['@H20', '@H21', '@H22']], ['Q10', ['@H23', '@H24', '@H25']] ] # Read the structure. self._execute_uf(uf_name='structure.read_pdb', file='gromacs.pdb', dir=DATA_PATH+sep+'structures'+sep+'phthalic_acid')
# # # 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 CPMG relaxation dispersion curve fitting using Dr. Flemming Hansen's data from http://dx.doi.org/10.1021/jp074793o.""" # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store ds = Relax_data_store() from status import Status status = Status() # The dispersion models. MODELS = ['LM63'] if hasattr(ds, 'models'): MODELS = ds.models # The temporary directory, if needed. if not hasattr(ds, 'tmpdir'): ds.tmpdir = 'temp' # The numeric flag. if not hasattr(ds, 'numeric_only'): ds.numeric_only = False
# Script for exponential curve-fitting to synthetic R1rho dispersion data. # Python module imports. from os import sep # relax module imports. from auto_analyses.relax_disp import Relax_disp from data_store import Relax_data_store; ds = Relax_data_store() from status import Status; status = Status() # Analysis variables. ##################### # The dispersion models. MODELS = ['R2eff'] # The grid search size (the number of increments per dimension). GRID_INC = 3 # The number of Monte Carlo simulations to be used for error analysis at the end of the analysis. MC_NUM = 3 # Set up the data pipe. ####################### # The results directory. if not hasattr(ds, 'tmpdir'): ds.tmpdir = None
# 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.
"""Script for testing the loading of phthalic acid NOEs from a generically formatted file.""" # 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() # Add a date pipe if one doesn't already exist. if not len(ds): self._execute_uf(uf_name='pipe.create', pipe_name='test', pipe_type='N-state') # NOE restraint file. if not hasattr(ds, 'file_name'): ds.file_name = 'phthalic_acid' # Path of the relaxation data. DATA_PATH = status.install_path + sep+'test_suite'+sep+'shared_data'+sep # Pseudo-atoms. PSEUDO = [ ['Q7', ['@H16', '@H17', '@H18']], ['Q9', ['@H20', '@H21', '@H22']], ['Q10', ['@H23', '@H24', '@H25']] ] # Read the structure. self._execute_uf(uf_name='structure.read_pdb', file='gromacs.pdb', dir=DATA_PATH+sep+'structures'+sep+'phthalic_acid')