当前位置: 首页>>代码示例>>Python>>正文


Python data_store.Relax_data_store类代码示例

本文整理汇总了Python中data_store.Relax_data_store的典型用法代码示例。如果您正苦于以下问题:Python Relax_data_store类的具体用法?Python Relax_data_store怎么用?Python Relax_data_store使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Relax_data_store类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Relax_data_store

# 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=':[email protected]')
self._execute_uf(uf_name='select.spin', spin_id=':[email protected]')
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:bmrb_rw.py

示例2: Kay

"""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'):
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:sprangers_data.py

示例3: Relax_data_store

# 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],
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:pseudo_ellipse_free_rotor.py

示例4: Relax_data_store

# 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.
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:palmer_omp.py

示例5: Relax_data_store

# 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)
开发者ID:pombredanne,项目名称:relax,代码行数:31,代码来源:relax_fit_saturation_recovery.py

示例6: RDCs

"""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)
开发者ID:pombredanne,项目名称:relax,代码行数:30,代码来源:pyrotartaric_anhydride.py

示例7: Relax_data_store

# 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
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py

示例8: Relax_data_store

#                                                                             #
# 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()

#########################################
开发者ID:pombredanne,项目名称:relax,代码行数:31,代码来源:1_setup_r1rho.py

示例9: Relax_data_store

# 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)
开发者ID:belisario21,项目名称:relax_trunk,代码行数:25,代码来源:create_peak_heights_T2_ncyc1.py

示例10: Relax_data_store

# 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',
开发者ID:pombredanne,项目名称:relax,代码行数:31,代码来源:relax_fit_exp_3param_inv_neg.py

示例11: Relax_data_store

"""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)
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:ri_back_calc.py

示例12: Relax_data_store

# 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'):
开发者ID:pombredanne,项目名称:relax,代码行数:31,代码来源:2_pre_run_r2eff.py

示例13: Relax_data_store

# 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)
开发者ID:belisario21,项目名称:relax_trunk,代码行数:18,代码来源:create_state_basic_single_pipe.py

示例14: Relax_data_store

"""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.
开发者ID:belisario21,项目名称:relax_trunk,代码行数:31,代码来源:tensor_opt.py

示例15: Relax_data_store

"""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')
开发者ID:belisario21,项目名称:relax_trunk,代码行数:30,代码来源:phthalic_acid_noes.py


注:本文中的data_store.Relax_data_store类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。