def grompp_mdruns(inp): cmdnames = cmds.GromacsCommands() if inp.testing(): # if there are no inputs, we're testing wheter the command can run cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp) return pers=cpc.dataflow.Persistence(os.path.join(inp.getPersistentDir(), "persistent.dat")) grompp_inputs = ['mdp','top','conf', 'ndx', 'settings', 'include' ] mdrun_inputs = [ 'priority', 'cmdline_options', 'resources'] inputs = grompp_inputs + mdrun_inputs grompp_outputs = [ 'tpr' ] mdrun_outputs = [ 'conf', 'xtc', 'trr', 'edr', 'log' ] outputs = grompp_outputs + mdrun_outputs running=0 if(pers.get("running")): running=pers.get("running") it=iterate.iterations(inp, inputs, outputs, pers) out=inp.getFunctionOutput() for i in xrange(running, it.getN()): gromppInstName="grompp_%d"%i mdrunInstName="mdrun_%d"%i out.addInstance(gromppInstName, "grompp") out.addInstance(mdrunInstName, "mdrun") out.addConnection('%s:out.tpr'%gromppInstName, '%s:in.tpr'%mdrunInstName) it.connectOnly(grompp_inputs, grompp_outputs, out, i, gromppInstName) it.connectOnly(mdrun_inputs, mdrun_outputs, out, i, mdrunInstName) running+=1 pers.set("running", running) pers.write() return out
def mdruns(inp): cmdnames = cmds.GromacsCommands() if inp.testing(): # if there are no inputs, we're testing wheter the command can run cpc.util.plugin.testCommand("%s -version" % cmdnames.trjcat) cpc.util.plugin.testCommand("%s -version" % cmdnames.eneconv) cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump) return pers=cpc.dataflow.Persistence(os.path.join(inp.getPersistentDir(), "persistent.dat")) inputs = ['tpr','priority','cmdline_options','resources'] outputs = [ 'conf', 'xtc', 'trr', 'edr', 'log' ] running=0 if(pers.get("running")): running=pers.get("running") it=iterate.iterations(inp, inputs, outputs, pers) out=inp.getFunctionOutput() for i in xrange(running, it.getN()): instName="mdrun_%d"%i out.addInstance(instName, "mdrun") it.connect(out, i, instName) running+=1 pers.set("running", running) pers.write() return out
def grompps(inp): cmdnames = cmds.GromacsCommands() if inp.testing(): # if there are no inputs, we're testing wheter the command can run cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp) return pers=cpc.dataflow.Persistence(os.path.join(inp.getPersistentDir(), "persistent.dat")) inputs = ['mdp','top','conf', 'ndx', 'settings', 'include'] outputs = [ 'tpr' ] running=0 if(pers.get("running")): running=pers.get("running") it=iterate.iterations(inp, inputs, outputs, pers) out=inp.getFunctionOutput() for i in xrange(running, it.getN()): instName="grompp_%d"%i out.addInstance(instName, "grompp") it.connect(out, i, instName) out.addConnection("%s:out.tpr"%instName, "self:ext_out.tpr[%d]"%i) running+=1 pers.set("running", running) pers.write() return out
def grompp_mdruns(inp): cmdnames = cmds.GromacsCommands() if inp.testing(): # if there are no inputs, we're testing wheter the command can run cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp) return pers = cpc.dataflow.Persistence( os.path.join(inp.getPersistentDir(), "persistent.dat")) grompp_inputs = ['mdp', 'top', 'conf', 'ndx', 'settings', 'include'] mdrun_inputs = ['priority', 'cmdline_options', 'resources'] inputs = grompp_inputs + mdrun_inputs grompp_outputs = ['tpr'] mdrun_outputs = ['conf', 'xtc', 'trr', 'edr', 'log'] outputs = grompp_outputs + mdrun_outputs running = 0 if (pers.get("running")): running = pers.get("running") it = iterate.iterations(inp, inputs, outputs, pers) out = inp.getFunctionOutput() for i in xrange(running, it.getN()): gromppInstName = "grompp_%d" % i mdrunInstName = "mdrun_%d" % i out.addInstance(gromppInstName, "grompp") out.addInstance(mdrunInstName, "mdrun") out.addConnection('%s:out.tpr' % gromppInstName, '%s:in.tpr' % mdrunInstName) it.connectOnly(grompp_inputs, grompp_outputs, out, i, gromppInstName) it.connectOnly(mdrun_inputs, mdrun_outputs, out, i, mdrunInstName) running += 1 pers.set("running", running) pers.write() return out
def mdruns(inp): cmdnames = cmds.GromacsCommands() if inp.testing(): # if there are no inputs, we're testing wheter the command can run cpc.util.plugin.testCommand("%s -version" % cmdnames.trjcat) cpc.util.plugin.testCommand("%s -version" % cmdnames.eneconv) cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump) return pers = cpc.dataflow.Persistence( os.path.join(inp.getPersistentDir(), "persistent.dat")) inputs = ['tpr', 'priority', 'cmdline_options', 'resources'] outputs = ['conf', 'xtc', 'trr', 'edr', 'log'] running = 0 if (pers.get("running")): running = pers.get("running") it = iterate.iterations(inp, inputs, outputs, pers) out = inp.getFunctionOutput() for i in xrange(running, it.getN()): instName = "mdrun_%d" % i out.addInstance(instName, "mdrun") it.connect(out, i, instName) running += 1 pers.set("running", running) pers.write() return out
def grompps(inp): cmdnames = cmds.GromacsCommands() if inp.testing(): # if there are no inputs, we're testing wheter the command can run cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp) return pers = cpc.dataflow.Persistence( os.path.join(inp.getPersistentDir(), "persistent.dat")) inputs = ['mdp', 'top', 'conf', 'ndx', 'settings', 'include'] outputs = ['tpr'] running = 0 if (pers.get("running")): running = pers.get("running") it = iterate.iterations(inp, inputs, outputs, pers) out = inp.getFunctionOutput() for i in xrange(running, it.getN()): instName = "grompp_%d" % i out.addInstance(instName, "grompp") it.connect(out, i, instName) out.addConnection("%s:out.tpr" % instName, "self:ext_out.tpr[%d]" % i) running += 1 pers.set("running", running) pers.write() return out