Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed mdrun_mpi detection for Gromacs 5.0 #19

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
11 changes: 6 additions & 5 deletions cpc/lib/fe/add_restraints
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ from cpc.dataflow import IntValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.dataflow import FileValue

from cpc.lib.gromacs import cmds

class FEError(cpc.dataflow.ApplicationError):
pass
Expand Down Expand Up @@ -196,11 +196,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/fe/binding
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ from cpc.dataflow import FloatValue
from cpc.dataflow import IntValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.lib.gromacs import cmds


class FEError(cpc.dataflow.ApplicationError):
Expand Down Expand Up @@ -174,11 +175,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/fe/binding_repeat
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ except ImportError:

import cpc.dataflow
from cpc.dataflow import FloatValue
from cpc.lib.gromacs import cmds


def fe_binding_repeat(inp, out):
Expand Down Expand Up @@ -142,11 +143,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
sys.exit(0)


Expand Down
1 change: 0 additions & 1 deletion cpc/lib/fe/calc_path
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ except ImportError:
import cpc.dataflow
from cpc.dataflow import FloatValue


class FEError(cpc.dataflow.ApplicationError):
pass

Expand Down
12 changes: 7 additions & 5 deletions cpc/lib/fe/decouple
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ from cpc.dataflow import FloatValue
from cpc.dataflow import IntValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.lib.gromacs import cmds

import fe_decouple



# read the input data
inf=StringIO()
inf.write(sys.stdin.read())
Expand All @@ -49,11 +49,13 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():

cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
12 changes: 7 additions & 5 deletions cpc/lib/fe/fe_init
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ from cpc.dataflow import ArrayValue
from cpc.dataflow import FileValue
from cpc.lib.gromacs import cmds
from utils import findClosest
from cpc.lib.gromacs import cmds

class FEError(cpc.dataflow.ApplicationError):
pass
Expand Down Expand Up @@ -96,7 +97,7 @@ def fe_init(inp, out):
#valarray.append(RecordValue( { 'name' : StringValue('sc-alpha'),
#'value' : StringValue('0.5') } ))
valarray.append(RecordValue( { 'name' : StringValue('sc-power'),
'value' : StringValue('1.0') } ))
'value' : StringValue('1') } ))
valarray.append(RecordValue( { 'name' : StringValue('sc-sigma'),
'value' : StringValue('0.3') } ))
valarray.append(RecordValue( { 'name' : StringValue('couple-lambda0'),
Expand Down Expand Up @@ -283,11 +284,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
11 changes: 6 additions & 5 deletions cpc/lib/fe/fe_iteration
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.dataflow import BoolValue
from utils import findClosest

from cpc.lib.gromacs import cmds

class FEError(cpc.dataflow.ApplicationError):
pass
Expand Down Expand Up @@ -334,11 +334,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
sys.exit(0)


Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/fe/solvation
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ from cpc.dataflow import FloatValue
from cpc.dataflow import IntValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.lib.gromacs import cmds

import fe_decouple

Expand All @@ -48,11 +49,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/fe/solvation_repeat
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ except ImportError:

import cpc.dataflow
from cpc.dataflow import FloatValue
from cpc.lib.gromacs import cmds


def fe_solvation_repeat(inp, out):
Expand Down Expand Up @@ -128,11 +129,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
sys.exit(0)


Expand Down
3 changes: 2 additions & 1 deletion cpc/lib/msm/gen_ref_pdb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def gen_ref_pdb(inp, out):
inp=cpc.dataflow.readInput()

if inp.testing():
cpc.util.plugin.testCommand("trjconv -version")
cmdnames = cmds.GromacsCommands()
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
sys.exit(0)

# prepare the output data
Expand Down
11 changes: 6 additions & 5 deletions cpc/lib/msm/tolh5
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def removeSolAndPBC(inFile, outFile, tprFile, grpname, ndxFile, persDir):
sys.stderr.write("Removing solvent and pbc:\n")
args = cmdnames.trjconv.split()
args += ["-f", "%s" % inFile, "-s", tprFile, "-o",
"%s "% outFile, "-pbc", "mol"]
"%s"% outFile, "-pbc", "mol"]
if ndxFile is not None:
args.extend( [ '-n', ndxFile ] )
proc = subprocess.Popen(args, stdin=subprocess.PIPE,
Expand Down Expand Up @@ -171,10 +171,11 @@ def tolh5(inp, out):
inp=cpc.dataflow.readInput()

if inp.testing():
cpc.util.plugin.testCommand("gmxcheck -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cmdnames = cmds.GromacsCommands()
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxcheck)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
sys.exit(0)

# prepare the output data
Expand Down
5 changes: 3 additions & 2 deletions cpc/lib/msm/traj_collect
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ except ImportError:

import cpc.dataflow
import cpc.util

from cpc.lib.gromacs import cmds

#import msmbuilder.Trajectory

Expand Down Expand Up @@ -126,7 +126,8 @@ def trajCollect(inp):
inp=cpc.dataflow.readInput()

if inp.testing():
cpc.util.plugin.testCommand("gmxcheck -version")
cmdnames = cmds.GromacsCommands()
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxcheck)
sys.exit(0)

# prepare the output data
Expand Down
9 changes: 5 additions & 4 deletions cpc/lib/swarms/get_cvs
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,12 @@ inf.seek(0)
inp = cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
9 changes: 5 additions & 4 deletions cpc/lib/swarms/get_dihedrals
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/swarms/prep_swarms
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ from cpc.dataflow import IntValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.dataflow import FileValue
from cpc.lib.gromacs import cmds

class FEError(cpc.dataflow.ApplicationError):
pass
Expand Down Expand Up @@ -134,11 +135,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/swarms/reparametrize
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ from cpc.dataflow import IntValue
from cpc.dataflow import FileValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.lib.gromacs import cmds

import reparametrize

Expand Down Expand Up @@ -167,11 +168,12 @@ inf.seek(0)
inp = cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
10 changes: 6 additions & 4 deletions cpc/lib/swarms/run_minimization
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ from cpc.dataflow import IntValue
from cpc.dataflow import RecordValue
from cpc.dataflow import ArrayValue
from cpc.dataflow import FileValue
from cpc.lib.gromacs import cmds

class FEError(cpc.dataflow.ApplicationError):
pass
Expand Down Expand Up @@ -195,11 +196,12 @@ inf.seek(0)
inp=cpc.dataflow.readInput(inf)

if inp.testing():
cmdnames = cmds.GromacsCommands()
# TODO: make it possible for sub-functions to be checked now.
cpc.util.plugin.testCommand("g_bar -version")
cpc.util.plugin.testCommand("grompp -version")
cpc.util.plugin.testCommand("trjconv -version")
cpc.util.plugin.testCommand("gmxdump -version")
cpc.util.plugin.testCommand("%s -version" % cmdnames.bar)
cpc.util.plugin.testCommand("%s -version" % cmdnames.grompp)
cpc.util.plugin.testCommand("%s -version" % cmdnames.trjconv)
cpc.util.plugin.testCommand("%s -version" % cmdnames.gmxdump)
# try to import msmproject and thereby msmbuilder
sys.exit(0)

Expand Down
Loading