mailr10746 - in /1.3/test_suite/system_tests/scripts: ./ n_state_model/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 18, 2010 - 17:16:
Author: bugman
Date: Thu Feb 18 17:16:25 2010
New Revision: 10746

URL: http://svn.gna.org/viewcvs/relax?rev=10746&view=rev
Log:
Shifted all the N-state model scripts into their directory.


Added:
    1.3/test_suite/system_tests/scripts/n_state_model/5_state_xz.py
      - copied unchanged from r10707, 
1.3/test_suite/system_tests/scripts/5_state_xz.py
    1.3/test_suite/system_tests/scripts/n_state_model/align_fit.py
      - copied unchanged from r10707, 
1.3/test_suite/system_tests/scripts/align_fit.py
    1.3/test_suite/system_tests/scripts/n_state_model/lactose_n_state.py
      - copied unchanged from r10707, 
1.3/test_suite/system_tests/scripts/lactose_n_state.py
    1.3/test_suite/system_tests/scripts/n_state_model/phthalic_acid_noes.py
      - copied unchanged from r10737, 
1.3/test_suite/system_tests/scripts/phthalic_acid_noes.py
Removed:
    1.3/test_suite/system_tests/scripts/5_state_xz.py
    1.3/test_suite/system_tests/scripts/align_fit.py
    1.3/test_suite/system_tests/scripts/lactose_n_state.py
    1.3/test_suite/system_tests/scripts/phthalic_acid_noes.py

Removed: 1.3/test_suite/system_tests/scripts/5_state_xz.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/5_state_xz.py?rev=10745&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/5_state_xz.py (original)
+++ 1.3/test_suite/system_tests/scripts/5_state_xz.py (removed)
@@ -1,91 +1,0 @@
-"""A 5-state model in the xz-plane (no pivotting of alpha).
-
-The 5 states correspond to the Euler angles (z-y-z notation):
-    State 1:    {0, pi/4, 0}
-    State 2:    {0, pi/8, 0}
-    State 3:    {0, 0, 0}
-    State 4:    {0, -pi/8, 0}
-    State 5:    {0, -pi/4, 0}
-"""
-
-# Python module imports.
-from math import cos, pi, sqrt
-
-
-# Create the data pipe.
-pipe.create('test', 'N-state')
-
-
-# Load the C-terminal alignment tensors.
-align_tensor.init(tensor='chi1 C-dom', params=(-1/2., -1/2.,  0.,   0.,     
0.))
-align_tensor.init(tensor='chi2 C-dom', params=(-1/8., -7/8.,  0.,   0.,     
0.))
-align_tensor.init(tensor='chi3 C-dom', params=(-1/8.,  1/16., 0.,   0.,    
-15/16.))
-align_tensor.init(tensor='chi4 C-dom', params=(7/16., -7/8.,  0.,   9/16.,  
0.))
-align_tensor.init(tensor='chi5 C-dom', params=(-1/2., -1/2.,  3/8., 0.,     
0.))
-
-# Set the domain the tensors correspond to.
-align_tensor.set_domain(tensor='chi1 C-dom', domain='C')
-align_tensor.set_domain(tensor='chi2 C-dom', domain='C')
-align_tensor.set_domain(tensor='chi3 C-dom', domain='C')
-align_tensor.set_domain(tensor='chi4 C-dom', domain='C')
-align_tensor.set_domain(tensor='chi5 C-dom', domain='C')
-
-# Calculate the singular values.
-align_tensor.svd(basis_set=0, tensors=['chi1 C-dom', 'chi2 C-dom', 'chi3 
C-dom', 'chi4 C-dom', 'chi5 C-dom'])
-align_tensor.svd(basis_set=1, tensors=['chi1 C-dom', 'chi2 C-dom', 'chi3 
C-dom', 'chi4 C-dom', 'chi5 C-dom'])
-
-# Calculate the angles between the matrices.
-align_tensor.matrix_angles(basis_set=0, tensors=['chi1 C-dom', 'chi2 C-dom', 
'chi3 C-dom', 'chi4 C-dom', 'chi5 C-dom'])
-align_tensor.matrix_angles(basis_set=1, tensors=['chi1 C-dom', 'chi2 C-dom', 
'chi3 C-dom', 'chi4 C-dom', 'chi5 C-dom'])
-
-
-# Load the N-terminal alignment tensors.
-align_tensor.init(tensor='chi1 N-dom', params=(1/20.*(2-3*sqrt(2)),   -1/2., 
  0.,              0.,   0.))
-align_tensor.init(tensor='chi2 N-dom', params=(1/80.*(26-9*sqrt(2)),  -7/8., 
  0.,              0.,  0.))
-align_tensor.init(tensor='chi3 N-dom', params=(-1/160.*(8+3*sqrt(2)),  
1/16.,  0.,    0., -3/16.*(1+sqrt(2)+2*cos(pi/8.))))
-align_tensor.init(tensor='chi4 N-dom', params=(7/16.,                 -7/8., 
  0.,    9/80.*(1+sqrt(2)),     0.))
-align_tensor.init(tensor='chi5 N-dom', params=(1/20.*(2-3*sqrt(2)),   -1/2., 
  3/40.*(1+sqrt(2)+2*cos(pi/8.)),   0., 0.))
-
-# Set the domain the tensors correspond to.
-align_tensor.set_domain(tensor='chi1 N-dom', domain='N')
-align_tensor.set_domain(tensor='chi2 N-dom', domain='N')
-align_tensor.set_domain(tensor='chi3 N-dom', domain='N')
-align_tensor.set_domain(tensor='chi4 N-dom', domain='N')
-align_tensor.set_domain(tensor='chi5 N-dom', domain='N')
-
-# Specify the tensor reductions.
-align_tensor.reduction(full_tensor='chi1 C-dom', red_tensor='chi1 N-dom')
-align_tensor.reduction(full_tensor='chi2 C-dom', red_tensor='chi2 N-dom')
-align_tensor.reduction(full_tensor='chi3 C-dom', red_tensor='chi3 N-dom')
-align_tensor.reduction(full_tensor='chi4 C-dom', red_tensor='chi4 N-dom')
-align_tensor.reduction(full_tensor='chi5 C-dom', red_tensor='chi5 N-dom')
-
-# Calculate the singular values.
-align_tensor.svd(basis_set=0, tensors=['chi1 N-dom', 'chi2 N-dom', 'chi3 
N-dom', 'chi4 N-dom', 'chi5 N-dom'])
-align_tensor.svd(basis_set=1, tensors=['chi1 N-dom', 'chi2 N-dom', 'chi3 
N-dom', 'chi4 N-dom', 'chi5 N-dom'])
-
-# Calculate the angles between the matrices.
-align_tensor.matrix_angles(basis_set=0, tensors=['chi1 N-dom', 'chi2 N-dom', 
'chi3 N-dom', 'chi4 N-dom', 'chi5 N-dom'])
-align_tensor.matrix_angles(basis_set=1, tensors=['chi1 N-dom', 'chi2 N-dom', 
'chi3 N-dom', 'chi4 N-dom', 'chi5 N-dom'])
-
-# Set up the 5-state model.
-n_state_model.select_model(model='2-domain')
-n_state_model.number_of_states(N=5)
-n_state_model.ref_domain(ref='C')
-
-# Set the initial parameter values to the actual values (the grid search is 
too expensive).
-for i in xrange(5):
-    value.set(0.2, 'p'+repr(i))
-    value.set(0.0, 'alpha'+repr(i))
-    value.set(pi/4-pi/8*i, 'beta'+repr(i))
-    value.set(0.0, 'gamma'+repr(i))
-#value.set()
-
-# Minimise.
-minimise('simplex', constraints=False)
-
-# Centre of mass analysis.
-n_state_model.CoM(pivot_point=[0.0, 0.0, 0.0], centre=[0.0, 0.0, 1.0])
-
-# Write the results.
-results.write(file='devnull')

Removed: 1.3/test_suite/system_tests/scripts/align_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/align_fit.py?rev=10745&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/align_fit.py (original)
+++ 1.3/test_suite/system_tests/scripts/align_fit.py (removed)
@@ -1,84 +1,0 @@
-"""Script for testing the fitting an alignment tensor to RDCs or PCSs."""
-
-# Python module imports.
-from os import sep
-import sys
-
-# relax module imports.
-from data import Relax_data_store; ds = Relax_data_store()
-from generic_fns import pipes
-
-
-# Path of the alignment data and structure.
-DATA_PATH = sys.path[-1] + 
sep+'test_suite'+sep+'shared_data'+sep+'align_data'+sep+'CaM'
-STRUCT_PATH = sys.path[-1] + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'
-
-# Create the data pipe.
-pipe.create('rdc', 'N-state')
-
-# 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.
-structure.read_pdb(file='bax_C_1J7P_N_H_Ca', dir=STRUCT_PATH)
-
-# Load the spins.
-structure.load_spins()
-
-# Load the NH vectors.
-structure.vectors(spin_id='@N', attached='H', ave=False)
-
-# Set the values needed to calculate the dipolar constant.
-value.set(1.041 * 1e-10, 'bond_length', spin_id="@N")
-value.set('15N', 'heteronucleus', spin_id="@N")
-value.set('1H', 'proton', spin_id="@N")
-
-# RDCs.
-if ds.mode in ['rdc', 'all']:
-    rdc.read(align_id='synth', file=rdc_file, dir=DATA_PATH, mol_name_col=1, 
res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6)
-
-# PCSs.
-if ds.mode in ['pcs', 'all']:
-    pcs.read(align_id='synth', file=pcs_file, dir=DATA_PATH, mol_name_col=1, 
res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5, data_col=6)
-
-    # Set the paramagnetic centre.
-    pcs.centre(atom_id=':1000@CA')
-
-    # The temperature.
-    temperature(id='synth', temp=303)
-
-    # The frequency.
-    frq.set(id='synth', frq=600.0 * 1e6)
-
-# Set up the model.
-n_state_model.select_model(model='fixed')
-
-# Set the tensor elements.
-#cdp.align_tensors[0].Axx = -0.351261/2000
-#cdp.align_tensors[0].Ayy = 0.556994/2000
-#cdp.align_tensors[0].Axy = -0.506392/2000
-#cdp.align_tensors[0].Axz = 0.560544/2000
-#cdp.align_tensors[0].Ayz = -0.286367/2000
-
-# Minimisation.
-grid_search(inc=3)
-minimise('simplex', constraints=False, max_iter=500)
-
-# Write out a results file.
-results.write('devnull', force=True)
-
-# Show the tensors.
-align_tensor.display()
-
-# Print the contents of the current data pipe (for debugging Q-values).
-print(cdp)
-print((cdp.align_tensors[0]))

Removed: 1.3/test_suite/system_tests/scripts/lactose_n_state.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/lactose_n_state.py?rev=10745&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/lactose_n_state.py (original)
+++ 1.3/test_suite/system_tests/scripts/lactose_n_state.py (removed)
@@ -1,96 +1,0 @@
-# Script for determining populations for lactose conformations using RDCs 
and PCSs.
-
-# Python module imports.
-from os import sep
-import sys
-
-# relax imports.
-from data import Relax_data_store; ds = Relax_data_store()
-from specific_fns.setup import n_state_model_obj
-
-
-# Path of the files.
-str_path = sys.path[-1] + 
sep+'test_suite'+sep+'shared_data'+sep+'structures'+sep+'lactose'
-data_path = sys.path[-1] + 
sep+'test_suite'+sep+'shared_data'+sep+'align_data'
-
-# Create the data pipe.
-pipe.create('lactose', 'N-state')
-
-# Load the structures.
-NUM_STR = 4
-for i in range(NUM_STR):
-    structure.read_pdb(file='lactose_MCMM4_S1_'+repr(i+1), dir=str_path, 
parser='internal', set_model_num=i+1, set_mol_name='lactose_MCMM4_S1')
-
-# Load the sequence information.
-structure.load_spins(spin_id=':UNK@C*', combine_models=False, ave_pos=False)
-structure.load_spins(spin_id=':UNK@H*', combine_models=False, ave_pos=False)
-
-# Deselect the CH2 protons (the rotation of these doesn't work in the model, 
but the carbon doesn't move).
-deselect.spin(spin_id=':UNK@H6')
-deselect.spin(spin_id=':UNK@H7')
-deselect.spin(spin_id=':UNK@H17')
-deselect.spin(spin_id=':UNK@H18')
-
-# Load the CH vectors for the C atoms.
-structure.vectors(spin_id='@C*', attached='H*', ave=False)
-
-# Set the values needed to calculate the dipolar constant.
-value.set(1.10 * 1e-10, 'bond_length', spin_id="@C*")
-value.set('13C', 'heteronucleus', spin_id="@C*")
-value.set('1H', 'proton', spin_id="@C*")
-
-# File list.
-align_list = ['Dy', 'Tb', 'Tm', 'Er']
-
-# Load the RDCs and PCSs.
-for i in xrange(len(align_list)):
-    # The RDC.
-    rdc.read(align_id=align_list[i], file='rdc.txt', dir=data_path, 
mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, 
spin_name_col=1, data_col=i+3, error_col=None)
-    rdc.read(align_id=align_list[i], file='rdc_err.txt', dir=data_path, 
mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, 
spin_name_col=1, data_col=None, error_col=i+3)
-
-    # The PCS.
-    pcs.read(align_id=align_list[i], file='pcs.txt', dir=data_path, 
mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, 
spin_name_col=1, data_col=i+2, error_col=None)
-    pcs.read(align_id=align_list[i], file='pcs_err.txt', dir=data_path, 
mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, 
spin_name_col=1, data_col=None, error_col=i+2)
-
-    # The temperature.
-    temperature(id=align_list[i], temp=298)
-
-    # The frequency.
-    frq.set(id=align_list[i], frq=900.015 * 1e6)
-
-# Create a data pipe for the aligned tag structures.
-pipe.create('tag', 'N-state')
-
-# Load all the tag structures.
-NUM_TAG = 10
-for i in range(NUM_TAG):
-    structure.read_pdb(file='tag_MCMM4_'+repr(i+1), dir=str_path, 
parser='internal', set_model_num=i+1, set_mol_name='tag')
-
-# Load the lanthanide atoms.
-structure.load_spins(spin_id='@C1', combine_models=False, ave_pos=False)
-
-# Switch back to the main analysis data pipe.
-pipe.switch('lactose')
-
-# Calculate the paramagnetic centre (from the structures in the 'tag' data 
pipe).
-pcs.centre(atom_id=':4@C1', pipe='tag')
-
-# Set up the model.
-n_state_model.select_model(model='population')
-
-# Set to equal probabilities.
-for j in xrange(NUM_STR):
-    value.set(1.0/NUM_STR, 'p'+repr(j))
-
-# Minimisation.
-minimise('bfgs', constraints=True, max_iter=5)
-
-# Calculate the AIC value.
-k, n, chi2 = n_state_model_obj.model_statistics()
-ds[ds.current_pipe].aic = chi2 + 2.0*k
-
-# Write out a results file.
-results.write('devnull', force=True)
-
-# Show the tensors.
-align_tensor.display()

Removed: 1.3/test_suite/system_tests/scripts/phthalic_acid_noes.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/phthalic_acid_noes.py?rev=10745&view=auto
==============================================================================
--- 1.3/test_suite/system_tests/scripts/phthalic_acid_noes.py (original)
+++ 1.3/test_suite/system_tests/scripts/phthalic_acid_noes.py (removed)
@@ -1,48 +1,0 @@
-"""Script for testing the loading of phthalic acid NOEs from a generically 
formatted file."""
-
-# Python module imports.
-from os import sep
-import sys
-
-# relax module imports.
-from data import Relax_data_store; ds = Relax_data_store()
-
-
-# Add a date pipe if one doesn't already exist.
-if not ds.keys():
-    pipe.create('test', 'N-state')
-
-# NOE restraint file.
-if not hasattr(ds, 'file_name'):
-    ds.file_name = 'phthalic_acid'
-
-# Path of the relaxation data.
-DATA_PATH = sys.path[-1] + 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.
-structure.read_pdb('gromacs.pdb', 
dir=DATA_PATH+sep+'structures'+sep+'phthalic_acid')
-
-# Load all protons as the sequence.
-structure.load_spins('@*H*', ave_pos=False)
-
-# Create the pseudo-atoms.
-for i in range(len(PSEUDO)):
-    spin.create_pseudo(spin_name=PSEUDO[i][0], res_id=None, 
members=PSEUDO[i][1], averaging='linear')
-
-# Read the NOE restraints.
-noe.read_restraints(file=ds.file_name, dir=DATA_PATH+'noe_restraints')
-
-# Set the type of N-state model.
-n_state_model.select_model(model='fixed')
-
-# Calculate the average NOE potential.
-calc()
-
-




Related Messages


Powered by MHonArc, Updated Thu Feb 18 17:40:03 2010