예제 #1
0
    def run_me(self, inputs=None):
        import os

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        # unique to run
        runname = 'test_crysol'
        dcdpath = './'
        dcdfile = 'test_crysol.dcd'
        pdbpath = './'
        pdbfile = 'new_dsDNA60.pdb'

        # system defaults
        # cryexe='/share/apps/bin/crysol.exe'
        cryexe = '/home/programs/sassie_bin/crysol.exe'
        delafs = '1'

        # my defaults
        # maxh='5'
        # fib='5'
        maxh = '15'
        fib = '18'
        maxs = '0.199'
        numpoints = '200'

        # program defaults
        option = '0'
        contrast = '0.03'
        edensolv = '0.334'
        hydrogens = 'N'

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        if inputs:
            in_vars = inputs
        else:
            in_vars = parse()

        if in_vars.dcdfile != None and in_vars.pdbfile != None:
            print 'loading parameters from command line'
            runname = in_vars.runname
            dcdpath = in_vars.dcdpath
            dcdfile = in_vars.dcdfile
            pdbpath = in_vars.pdbpath
            pdbfile = in_vars.pdbfile
            maxh = in_vars.maxh
            fib = in_vars.fib
            maxs = in_vars.maxs
            numpoints = in_vars.numpoints
        else:
            print 'using default parameters from driver script'

        svariables = {}

        svariables['runname'] = (runname, 'string')
        svariables['dcdpath'] = (dcdpath, 'string')
        svariables['dcdfile'] = (dcdfile, 'string')
        svariables['pdbpath'] = (pdbpath, 'string')
        svariables['pdbfile'] = (pdbfile, 'string')
        svariables['cryexe'] = (cryexe, 'string')
        svariables['delafs'] = (delafs, 'int')
        svariables['option'] = (option, 'string')
        svariables['maxh'] = (maxh, 'string')
        svariables['fib'] = (fib, 'string')
        svariables['maxs'] = (maxs, 'string')
        svariables['numpoints'] = (numpoints, 'string')
        svariables['contrast'] = (contrast, 'string')
        svariables['edensolv'] = (edensolv, 'string')
        svariables['hydrogens'] = (hydrogens, 'string')

        error, self.variables = input_filter.type_check_and_convert(svariables)
        import shutil
        import os
        if os.path.exists(runname + '/' + self.module):
            shutil.rmtree(runname + '/' + self.module)

        if(len(error) > 0):
            print 'error = ', error
            sys.exit()

        runname = self.variables['runname'][0]

        import multiprocessing
        #        import sassie.tools.center as center

        txtQueue = multiprocessing.JoinableQueue()
        gcrysol.gcrysol(self.variables, txtQueue)
예제 #2
0
svariables['low_rg_cutoff'] = (low_rg_cutoff, 'float')
svariables['high_rg_cutoff'] = (high_rg_cutoff, 'float')

svariables['z_flag'] = (z_flag, 'boolean')
svariables['z_cutoff'] = (z_cutoff, 'float')

svariables['constraint_flag'] = (constraint_flag, 'boolean')
svariables['constraint_file'] = (constraint_file, 'string')

svariables['nonbondflag'] = (nonbondflag, 'int')
svariables['seed'] = (seed, 'int_array')



error, variables = input_filter.type_check_and_convert(svariables)
if len(error) > 0:
    print 'error = ', error
    sys.exit()

#import pprint; pprint.pprint(variables); exit()

txtQueue = multiprocessing.JoinableQueue()
simulation = monte_carlo.simulation()
simulation.main(variables, txtQueue)
this_text = txtQueue.get(True, timeout=0.1)


#print 'in GUI and txtOutput = ', this_text, '\n'

예제 #3
0
    def run_me(self):
        import os

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        runname = 'dsDNA60bps'
        infile = './140904_094120_new_dsDNA60.dcd'
        # this is the atom info file (for use with a dcd)
        pdbfile = './new_dsDNA60.pdb'
        outfile = 'dsDNA60_100s_min.dcd'
        psffile = './new_dsDNA60.psf'

        nsteps = '2000'
        parmfile = '/usr/local/bin/toppar/par_all27_prot_na.inp'
        ncpu = '4'
        keepout = '1'
        dcdfreq = '20'
        # 'dcd'  # need to change this to dcd if I input a dcd file
        infiletype = infile[-3:]

        md = '0'
        mdsteps = '100'
        dielect = '80.0'
        temperature = '300.0'

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        uname = os.popen("whoami").read()
        if 'schowell\n' == uname:
            ARGS = parse()
            runname = ARGS.runname
            infile = ARGS.infile
            infiletype = ARGS.infile[-3:]
            pdbfile = ARGS.pdbfile
            outfile = ARGS.outfile
            nsteps = ARGS.nsteps
            parmfile = ARGS.parmfile
            psffile = ARGS.psffile
            ncpu = ARGS.ncpu
            keepout = ARGS.keepout
            dcdfreq = ARGS.dcdfreq
            md = ARGS.md
            mdsteps = ARGS.mdsteps
            dielect = ARGS.dielect
            temperature = ARGS.temperature

        svariables = {}

        svariables['runname'] = (runname, 'string')
        svariables['infile'] = (infile, 'string')
        svariables['pdbfile'] = (pdbfile, 'string')
        svariables['outfile'] = (outfile, 'string')
        svariables['nsteps'] = (nsteps, 'int')
        svariables['parmfile'] = (parmfile, 'string')
        svariables['psffile'] = (psffile, 'string')
        svariables['ncpu'] = (ncpu, 'int')
        #svariables['energyfile']       = (energyfile,'string')
        svariables['keepout'] = (keepout, 'int')
        svariables['dcdfreq'] = (dcdfreq, 'int')
        svariables['infiletype'] = ('dcd', 'string')

        svariables['md'] = (md, 'int')
        svariables['mdsteps'] = (mdsteps, 'int')
        svariables['dielect'] = (dielect, 'float')
        svariables['temperature'] = (temperature, 'float')

        error, variables = input_filter.type_check_and_convert(svariables)

        if(len(error) != 0):
            print 'error = ', error
            sys.exit()
        else:
            error = minimize_filter.check_minimize(variables)

            if(len(error) != 0):
                print 'error = ', error
                sys.exit()

        runname = variables['runname'][0]

        import multiprocessing
        import shutil
        import os
        if os.path.exists(runname + '/' + self.module):
            shutil.rmtree(runname + '/' + self.module)

        txtQueue = multiprocessing.JoinableQueue()
        minimize.minimize(variables, txtQueue)
예제 #4
0
    def run_me(self):

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        runname = 'run_0'
        dcdfile = './data/generate/run_0.dcd'
        pdbfile = './data/generate/min3.pdb'
        nsegments = '1'
        ofile = 'test'
        xlength = '350.0'
        gridsp = '6.0'
        ylength = '350.0'
        basis = 'calpha'
        zlength = '350.0'
        nregions = '5'
        lowregions = '1, 124, 143, 355, 380'
        highregions = '123, 142, 353, 379, 420'
        equalweights = '1'
        weightfile = './data/filter/x2lowweights.txt'
        save_occupancy = 'N'

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        svariables = {}

        svariables['runname'] = (runname, 'string')
        svariables['nsegments'] = (nsegments, 'int')
        svariables['dcdfile'] = (dcdfile, 'string')
        svariables['pdbfile'] = (pdbfile, 'string')
        svariables['ofile'] = (ofile, 'string')
        svariables['xlength'] = (xlength, 'float')
        svariables['gridsp'] = (gridsp, 'float')
        svariables['ylength'] = (ylength, 'float')
        svariables['basis'] = (basis, 'string')
        svariables['zlength'] = (zlength, 'float')
        svariables['nregions'] = (nregions, 'int')
        svariables['lowregions'] = (lowregions, 'int_array')
        svariables['highregions'] = (highregions, 'int_array')
        svariables['equalweights'] = (equalweights, 'int')
        svariables['weightsfile'] = (weightfile, 'string')
        svariables['save_occupancy'] = (save_occupancy, 'string')

        error, self.variables = input_filter.type_check_and_convert(svariables)

        if(len(error) > 0):
            print 'error = ', error
            sys.exit()

        runname = self.variables['runname'][0]

        import multiprocessing
        import shutil
        import os
        if os.path.exists(runname + '/' + self.module):
            shutil.rmtree(runname + '/' + self.module)

        txtQueue = multiprocessing.JoinableQueue()
        segvariables = [
            ['5', '1,124,143,355,380', '123,142,353,379,420', 'CA', 'GAG']]
        density.density(self.variables, segvariables, txtQueue)
    def run_me(self):
        import os

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        runname = 'dsDNA60bps'
        infile = './140904_094120_new_dsDNA60.dcd'
        # this is the atom info file (for use with a dcd)
        pdbfile = './new_dsDNA60.pdb'
        outfile = 'dsDNA60_100s_min.dcd'
        psffile = './new_dsDNA60.psf'

        nsteps = '2000'
        parmfile = '/usr/local/bin/toppar/par_all27_prot_na.inp'
        ncpu = '4'
        keepout = '1'
        dcdfreq = '20'
        # 'dcd'  # need to change this to dcd if I input a dcd file
        infiletype = infile[-3:]

        md = '0'
        mdsteps = '100'
        dielect = '80.0'
        temperature = '300.0'

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        uname = os.popen("whoami").read()
        if 'schowell\n' == uname:
            ARGS = parse()
            runname = ARGS.runname
            infile = ARGS.infile
            infiletype = ARGS.infile[-3:]
            pdbfile = ARGS.pdbfile
            outfile = ARGS.outfile
            nsteps = ARGS.nsteps
            parmfile = ARGS.parmfile
            psffile = ARGS.psffile
            ncpu = ARGS.ncpu
            keepout = ARGS.keepout
            dcdfreq = ARGS.dcdfreq
            md = ARGS.md
            mdsteps = ARGS.mdsteps
            dielect = ARGS.dielect
            temperature = ARGS.temperature

        svariables = {}

        svariables['runname'] = (runname, 'string')
        svariables['infile'] = (infile, 'string')
        svariables['pdbfile'] = (pdbfile, 'string')
        svariables['outfile'] = (outfile, 'string')
        svariables['nsteps'] = (nsteps, 'int')
        svariables['parmfile'] = (parmfile, 'string')
        svariables['psffile'] = (psffile, 'string')
        svariables['ncpu'] = (ncpu, 'int')
        #svariables['energyfile']       = (energyfile,'string')
        svariables['keepout'] = (keepout, 'int')
        svariables['dcdfreq'] = (dcdfreq, 'int')
        svariables['infiletype'] = ('dcd', 'string')

        svariables['md'] = (md, 'int')
        svariables['mdsteps'] = (mdsteps, 'int')
        svariables['dielect'] = (dielect, 'float')
        svariables['temperature'] = (temperature, 'float')

        svariables['use_external_input_file'] = ('False','boolean')
        svariables['external_input_file'] = ('','string')

        svariables['velocity_restart_file'] = ('','string')
        svariables['extended_system_restart_file'] = ('','string')

        error, variables = input_filter.type_check_and_convert(svariables)

        if(len(error) != 0):
            print 'error = ', error
            sys.exit()
        else:
            error = minimize_filter.check_minimize(variables)

            if(len(error) != 0):
                print 'error = ', error
                sys.exit()

        runname = variables['runname'][0]

        import multiprocessing
        import shutil
        import os
        if os.path.exists(runname + '/' + self.module):
            shutil.rmtree(runname + '/' + self.module)

        txtQueue = multiprocessing.JoinableQueue()
        minimize.minimize(variables, txtQueue)
예제 #6
0
    def run_me(self, inputs=None):
        import os

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        # unique to run
        runname = 'test_crysol'
        dcdpath = './'
        dcdfile = 'test_crysol.dcd'
        pdbpath = './'
        pdbfile = 'new_dsDNA60.pdb'

        # system defaults
        # cryexe='/share/apps/bin/crysol.exe'
        cryexe = '/home/programs/sassie_bin/crysol.exe'
        delafs = '1'

        # my defaults
        # maxh='5'
        # fib='5'
        maxh = '15'
        fib = '18'
        maxs = '0.199'
        numpoints = '200'

        # program defaults
        option = '0'
        contrast = '0.03'
        edensolv = '0.334'
        hydrogens = 'N'

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        if inputs:
            in_vars = inputs
        else:
            in_vars = parse()

        if in_vars.dcdfile != None and in_vars.pdbfile != None:
            print 'loading parameters from command line'
            runname = in_vars.runname
            dcdpath = in_vars.dcdpath
            dcdfile = in_vars.dcdfile
            pdbpath = in_vars.pdbpath
            pdbfile = in_vars.pdbfile
            maxh = in_vars.maxh
            fib = in_vars.fib
            maxs = in_vars.maxs
            numpoints = in_vars.numpoints
        else:
            print 'using default parameters from driver script'

        svariables = {}

        svariables['runname'] = (runname, 'string')
        svariables['dcdpath'] = (dcdpath, 'string')
        svariables['dcdfile'] = (dcdfile, 'string')
        svariables['pdbpath'] = (pdbpath, 'string')
        svariables['pdbfile'] = (pdbfile, 'string')
        svariables['cryexe'] = (cryexe, 'string')
        svariables['delafs'] = (delafs, 'int')
        svariables['option'] = (option, 'string')
        svariables['maxh'] = (maxh, 'string')
        svariables['fib'] = (fib, 'string')
        svariables['maxs'] = (maxs, 'string')
        svariables['numpoints'] = (numpoints, 'string')
        svariables['contrast'] = (contrast, 'string')
        svariables['edensolv'] = (edensolv, 'string')
        svariables['hydrogens'] = (hydrogens, 'string')

        error, self.variables = input_filter.type_check_and_convert(svariables)
        import shutil
        import os
        if os.path.exists(runname + '/' + self.module):
            shutil.rmtree(runname + '/' + self.module)

        if (len(error) > 0):
            print 'error = ', error
            sys.exit()

        runname = self.variables['runname'][0]

        import multiprocessing
        #        import sassie.tools.center as center

        txtQueue = multiprocessing.JoinableQueue()
        gcrysol.gcrysol(self.variables, txtQueue)
예제 #7
0
    def run_me(self):

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        runname = 'run_0'
        dcdfile = './data/generate/run_0.dcd'
        pdbfile = './data/generate/min3.pdb'
        nsegments = '1'
        ofile = 'test'
        xlength = '350.0'
        gridsp = '6.0'
        ylength = '350.0'
        basis = 'calpha'
        zlength = '350.0'
        nregions = '5'
        lowregions = '1, 124, 143, 355, 380'
        highregions = '123, 142, 353, 379, 420'
        equalweights = '1'
        weightfile = './data/filter/x2lowweights.txt'
        save_occupancy = 'N'

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        svariables = {}

        svariables['runname'] = (runname, 'string')
        svariables['nsegments'] = (nsegments, 'int')
        svariables['dcdfile'] = (dcdfile, 'string')
        svariables['pdbfile'] = (pdbfile, 'string')
        svariables['ofile'] = (ofile, 'string')
        svariables['xlength'] = (xlength, 'float')
        svariables['gridsp'] = (gridsp, 'float')
        svariables['ylength'] = (ylength, 'float')
        svariables['basis'] = (basis, 'string')
        svariables['zlength'] = (zlength, 'float')
        svariables['nregions'] = (nregions, 'int')
        svariables['lowregions'] = (lowregions, 'int_array')
        svariables['highregions'] = (highregions, 'int_array')
        svariables['equalweights'] = (equalweights, 'int')
        svariables['weightsfile'] = (weightfile, 'string')
        svariables['save_occupancy'] = (save_occupancy, 'string')

        error, self.variables = input_filter.type_check_and_convert(svariables)

        if (len(error) > 0):
            print 'error = ', error
            sys.exit()

        runname = self.variables['runname'][0]

        import multiprocessing
        import shutil
        import os
        if os.path.exists(runname + '/' + self.module):
            shutil.rmtree(runname + '/' + self.module)

        txtQueue = multiprocessing.JoinableQueue()
        segvariables = [[
            '5', '1,124,143,355,380', '123,142,353,379,420', 'CA', 'GAG'
        ]]
        density.density(self.variables, segvariables, txtQueue)
    svariables['highrg'] = (highrg, 'float')
    svariables['zflag'] = (zflag, 'int')
    svariables['zcutoff'] = (zcutoff, 'float')
    svariables['nonbondflag'] = (nbflag, 'int')
    svariables['nonbondscale'] = (nbscale, 'float')
    svariables['psffilepath'] = (psffilepath, 'string')
    svariables['psffilename'] = (psffilename, 'string')
    svariables['parmfilepath'] = (parmfilepath, 'string')
    svariables['parmfilename'] = (parmfilename, 'string')
    svariables['plotflag'] = (plotflag, 'int')
    svariables['seed'] = (seed, 'int_array')

    import sassie.simulate.monte_carlo.monomer.dihedral as dihedral
    import sassie.interface.input_filter as input_filter
    #import sassie.interface.generate_filter as generate_filt
    error, variables = input_filter.type_check_and_convert(svariables)

    #eflag=0 ; monflag=1

    # error=generate_filter.check_protein(variables,eflag,monflag)

    if(len(error) > 0):
        print 'error = ', error
        sys.exit()

    runname = variables['runname'][0]

    import multiprocessing

    txtQueue = multiprocessing.JoinableQueue()
    dihedralgenerate(variables, txtQueue)
예제 #9
0
    def run_me(self, inputs=None):
        import os

        # BEGIN USER EDIT
        # BEGIN USER EDIT
        # BEGIN USER EDIT

        # unique to run
        runname = "test_crysol"
        dcdpath = "./"
        dcdfile = "test_crysol.dcd"
        pdbpath = "./"
        pdbfile = "new_dsDNA60.pdb"

        # system defaults
        # cryexe='/share/apps/bin/crysol.exe'
        cryexe = "/home/programs/sassie_bin/crysol.exe"
        delafs = "1"

        # my defaults
        # maxh='5'
        # fib='5'
        maxh = "15"
        fib = "18"
        maxs = "0.199"
        numpoints = "200"

        # program defaults
        option = "0"
        contrast = "0.03"
        edensolv = "0.334"
        hydrogens = "N"

        # END USER EDIT
        # END USER EDIT
        # END USER EDIT

        try:
            in_vars = inputs
        except:
            in_vars = parse()

        if in_vars.dcdfile != None and in_vars.pdbfile != None:
            print "loading parameters from command line"
            runname = in_vars.runname
            dcdpath = in_vars.dcdpath
            dcdfile = in_vars.dcdfile
            pdbpath = in_vars.pdbpath
            pdbfile = in_vars.pdbfile
            maxh = in_vars.maxh
            fib = in_vars.fib
            maxs = in_vars.maxs
            numpoints = in_vars.numpoints
        else:
            print "using default parameters from driver script"

        svariables = {}

        svariables["runname"] = (runname, "string")
        svariables["dcdpath"] = (dcdpath, "string")
        svariables["dcdfile"] = (dcdfile, "string")
        svariables["pdbpath"] = (pdbpath, "string")
        svariables["pdbfile"] = (pdbfile, "string")
        svariables["cryexe"] = (cryexe, "string")
        svariables["delafs"] = (delafs, "int")
        svariables["option"] = (option, "string")
        svariables["maxh"] = (maxh, "string")
        svariables["fib"] = (fib, "string")
        svariables["maxs"] = (maxs, "string")
        svariables["numpoints"] = (numpoints, "string")
        svariables["contrast"] = (contrast, "string")
        svariables["edensolv"] = (edensolv, "string")
        svariables["hydrogens"] = (hydrogens, "string")

        error, self.variables = input_filter.type_check_and_convert(svariables)
        import shutil
        import os

        if os.path.exists(runname + "/" + self.module):
            shutil.rmtree(runname + "/" + self.module)

        if len(error) > 0:
            print "error = ", error
            sys.exit()

        runname = self.variables["runname"][0]

        import multiprocessing

        #        import sassie.tools.center as center

        txtQueue = multiprocessing.JoinableQueue()
        gcrysol.gcrysol(self.variables, txtQueue)