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, "?".

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


from pylinus_1_0 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

#Note extra msfile argument here
def run(file, seed=None, msfile=None):
    if seed is None:
        gen = apply(ran.generator, gen_seeds())
    else:
        gen = apply(ran.generator, seed)
        
    sim = linusSim.Linus(file, gen)

#Here is where the ms file is
    if msfile is not None:
        msfile = os.path.abspath(msfile)
        sim.load_mesostates(msfile)
    
#Beginning of parameter section
    sim.set_simulation_parameters(numsave=100, 
                                  numcycle=5000)
    sim.set_hbond_parameters(use_hbond=1,
                             use_sidechain_hbond=1)
    sim.set_contact_parameters(use_contact=1)
#End of parameter section

    sim.run()

if __name__ == "__main__":
    try:
        import psyco
    except ImportError:
        pass
    else:
        psyco.bind(run)  
    import sys, os
    filename = sys.argv[1]
#Look for name of ms file
    try:
        msfile = sys.argv[2]
    except IndexError:
        msfile = None
    else:
        msfile = os.path.abspath(msfile)
    run(filename, msfile=msfile)