Changes

Jump to navigation Jump to search

Tutorial for model free SBiNLab

3,582 bytes added, 18:22, 15 October 2017
* Modelfree4 : User function: palmer.create()
* dasha : User function: dasha.create()
 
Make a '''06_check_intermediate_convert.py ''' file, with this content.
{| class="mw-collapsible mw-collapsed wikitable"
! See file content
|-
|
<source lang="python">
# Python module imports.
import os, stat
 
# relax module imports.
from specific_analyses.model_free.model import determine_model_type
 
# Read the state with the setup
# The results dir.
var = 'result_06'
model = 'sphere'
round_nr = 'round_4'
results_dir = os.getcwd() + os.sep + var + os.sep + model + os.sep + round_nr + os.sep + 'aic'
# Load the state with setup data.
state.load(state='results.bz2', dir=results_dir, force=True)
######
#Create the Modelfree4 input files.
#####
 
#Defaults
# dir: The directory to place the files.
# force: A flag which if set to True will cause the results file to be overwritten if it already exists.
# binary: The name of the executable Modelfree program file.
# diff_search: See the Modelfree4 manual for 'diffusion_search'.
# sims: The number of Monte Carlo simulations.
# sim_type: See the Modelfree4 manual.
# trim: See the Modelfree4 manual.
# steps: See the Modelfree4 manual.
# constraints: A flag specifying whether the parameters should be constrained. The default is to turn constraints on (constraints=True).
# heteronuc_type: A three letter string describing the heteronucleus type, ie '15N', '13C', etc.
# atom1: The symbol of the X heteronucleus in the PDB file.
# atom2: The symbol of the H nucleus in the PDB file.
# spin_id: The spin identification string.
 
# The following files are created
# - 'dir/mfin'
# - 'dir/mfdata'
# - 'dir/mfpar'
# - 'dir/mfmodel'
# - 'dir/run.sh'
 
# The file 'dir/run.sh' contains the single command,
# 'modelfree4 -i mfin -d mfdata -p mfpar -m mfmodel -o mfout -e out',
 
# which can be used to execute modelfree4.
# If you would like to use a different Modelfree executable file, change the binary name to the
# appropriate file name. If the file is not located within the environment's path, include the full
# path in front of the binary file name.
 
#palmer.create(dir=None, force=False,
# binary='modelfree4', diff_search='none', sims=0,
# sim_type='pred', trim=0, steps=20,
# constraints=True, heteronuc_type='15N', atom1='N', atom2='H',
# spin_id=None)
 
# Define write out
out = 'result_06_check_intermediate'
write_modelfree = os.getcwd() + os.sep + out + os.sep + "Modelfree4"
 
outdir = os.getcwd()
palmer.create(dir=write_modelfree, force=True,
binary='modelfree4', diff_search='none', sims=0,
sim_type='pred', trim=0, steps=20,
constraints=True, heteronuc_type='15N', atom1='N', atom2='H',
spin_id=None)
######
#Create the Dasha script
#####
 
#Defaults
# algor: The minimisation algorithm.
# dir: The directory to place the files.
# force: A flag which if set to True will cause the results file to be overwritten if it already exists.
 
# Optimisation algorithms
#The two minimisation algorithms within Dasha are accessible through the algorithm which can be set to:
# 'LM': The Levenberg-Marquardt algorithm,
# 'NR': Newton-Raphson algorithm.
# For Levenberg-Marquardt minimisation, the function 'lmin' will be called, while for Newton-Raphson,
# the function 'min' will be executed.
 
# dasha.create(algor='LM', dir=None, force=False)
 
model_type = determine_model_type()
print(model_type)
 
# Define write out
out = 'result_06_check_intermediate'
write_dasha = os.getcwd() + os.sep + out + os.sep + "Dasha"
#dasha.create(algor='LM', dir=write_dasha, force=True)
</source>
|}
 
Run with:
<source lang="bash">
relax 06_check_intermediate_convert.py
</source>
= To run on Haddock =
Trusted, Bureaucrats
1,382

edits

Navigation menu