Home Linus Helper Programs Examples File Descriptions Index

Sample LINUS Run Files

 

Minimal Run File

Multiple Simulation Run File

Read Weights Run File

Read Mesostate Run File

All Options Run File


LINUS

 

This command file will run a LINUS simulation with secondary structure conformation weights from mesostate list.

A mesostate list is a list of letter codes defining the φ and ψ values for each residue of a protein. The assignment of letters to various ranges of the φ ψ map is explained here. You can restrain the LINUS move set to one or more mesostate codes or let individual backbone angles "float" with the default move set by using the mesostate code, "??".

An example of a mesostates file is:


??
??
Dk
Cl
Ck
Cj
Dk
Dl
Ef
Dg
Jg
Dk
Ck
Ck
Dk
Cl
Ck
Bl
??
??

The first two and last two residues are not assigned specific mesostates. The acetyl group (ACE, residue index 0) is the first residue and N-methyl amide (NME, residue index N-1) is the last group; these do not have mesostates. Furthermore the first actual amino acid (residue index 1) does not have a φ value and the last actual amino acid (residue index N-2) does not have a ψ value.

Make a copy of this file in your working directory and edit it appropriately as described in the Example 4. section.


from pylinus_2_3 import linusSim, ran

def gen_seeds():
    from random import uniform
    s1 = long(uniform(1.0, ran.M1))
    s2 = long(uniform(1.0, ran.M1))
    s3 = long(uniform(1.0, ran.M1))
    s4 = long(uniform(1.0, ran.M2))
    s5 = long(uniform(1.0, ran.M2))
    s6 = long(uniform(1.0, ran.M2))
    return s1, s2, s3, s4, s5, s6

def run(file,seed=None,mlfile=None,wtsfile=None,msfile=None,
        pmsfile=None,distfile=None):
    if seed is None:
        gen = apply(ran.generator, gen_seeds())
    else:
        gen = apply(ran.generator, seed)
    sim = linusSim.Linus(file, gen)
    sim.load_movelist(mlfile)
    sim.set_simulation_parameters(numsave=10,
                                  numcycle=50)
    sim.set_hbond_parameters(use_hbond=1)
    sim.set_contact_parameters(use_contact=1)
    sim.run()

if __name__ == "__main__":
    try:
        import psyco
    except ImportError:
        pass
    else:
        psyco.bind(run)  
    import sys, os
    filename = sys.argv[1]
    file = os.path.basename(filename)
    basedir = os.getcwd()

    msfile = os.path.abspath('mesostates')

#
# The loop below demonstrates how to launch multiple simulations
# from one command file.
# Increment the range to perform additional simulations
# 
# Note that the "mesostates" file needs to be linked in each sub-directory
#
    for i in range(2):       
        curdir = basedir + os.sep + 'sim_' + `i+1`
        os.mkdir(curdir)
        os.link(filename, curdir+os.sep+file)
        os.link('weights', curdir+os.sep+'weights')
        os.chdir(curdir)
        run(file,msfile=msfile)