Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion actions/update_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

# Store the name of the recipe and template YAML files.
recipe = os.path.join(condadir, "meta.yaml")
template = os.path.join(condadir, "template.yaml")

# If the BSS_TEMPLATE environment variable is set, use that as the template.
if "BSS_TEMPLATE" in os.environ:
template = os.environ["BSS_TEMPLATE"]
else:
template = os.path.join(condadir, "template.yaml")

# Now parse all of the requirements
run_reqs = parse_requirements(os.path.join(srcdir, "requirements.txt"))
Expand Down
24 changes: 24 additions & 0 deletions python/BioSimSpace/Parameters/_Protocol/_amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,25 @@
if not _os.path.isfile(_parmchk_exe):
raise IOError("Missing parmchk executable: '%s'" % _parmchk_exe)

# Check for ABCG2 support.
_has_abcg2 = False

try:
cmd = "antechamber -L"
proc = _subprocess.run(
_Utils.command_split(cmd),
shell=False,
stdout=_subprocess.PIPE,
stderr=_subprocess.PIPE,
text=True,
)
if proc.returncode == 0:
# Check the output for ABCG2 support.
if "abcg2" in proc.stdout:
_has_abcg2 = True
except:
pass


class AmberProtein(_protocol.Protocol):
"""A class for handling AMBER protein force field models."""
Expand Down Expand Up @@ -834,6 +853,11 @@ class GAFF(_protocol.Protocol):
# A list of supported charge methods.
_charge_methods = ["RESP", "CM2", "MUL", "BCC", "ESP", "GAS"]

# Add ABCG2 to the list of charge methods if it is supported.
# This requires Antechamber > 24.0.
if _has_abcg2:
_charge_methods.append("ABCG2")

def __init__(
self,
version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,25 @@
if not _os.path.isfile(_parmchk_exe):
raise IOError("Missing parmchk executable: '%s'" % _parmchk_exe)

# Check for ABCG2 support.
_has_abcg2 = False

try:
cmd = "antechamber -L"
proc = _subprocess.run(
_Utils.command_split(cmd),
shell=False,
stdout=_subprocess.PIPE,
stderr=_subprocess.PIPE,
text=True,
)
if proc.returncode == 0:
# Check the output for ABCG2 support.
if "abcg2" in proc.stdout:
_has_abcg2 = True
except:
pass


class AmberProtein(_protocol.Protocol):
"""A class for handling AMBER protein force field models."""
Expand Down Expand Up @@ -834,6 +853,11 @@ class GAFF(_protocol.Protocol):
# A list of supported charge methods.
_charge_methods = ["RESP", "CM2", "MUL", "BCC", "ESP", "GAS"]

# Add ABCG2 to the list of charge methods if it is supported.
# This requires Antechamber > 24.0.
if _has_abcg2:
_charge_methods.append("ABCG2")

def __init__(
self,
version,
Expand Down