Skip to content

Commit 75e9549

Browse files
committed
Remove AnteChamber check. No version is reported for AmberTools 24.
1 parent 08e514b commit 75e9549

File tree

2 files changed

+0
-102
lines changed

2 files changed

+0
-102
lines changed

python/BioSimSpace/Parameters/_parameters.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -534,57 +534,6 @@ def _parameterise_openff(
534534
"must be in your PATH."
535535
) from None
536536

537-
# Check the Antechamber version. Open Force Field requires Antechamber >= 22.0.
538-
try:
539-
# Antechamber returns an exit code of 1 when requesting version information.
540-
# As such, we wrap the call within a try-except block in case it fails.
541-
542-
import shlex as _shlex
543-
import subprocess as _subprocess
544-
545-
# Generate the command-line string. (Antechamber must be in the PATH,
546-
# so no need to use AMBERHOME.
547-
command = "antechamber -v"
548-
549-
# Run the command as a subprocess.
550-
proc = _subprocess.run(
551-
_Utils.command_split(command),
552-
shell=False,
553-
text=True,
554-
stdout=_subprocess.PIPE,
555-
stderr=_subprocess.STDOUT,
556-
)
557-
558-
# Get stdout and split into lines.
559-
lines = proc.stdout.split("\n")
560-
561-
# If present, version information is on line 1.
562-
string = lines[1]
563-
564-
# Delete the welcome message.
565-
string = string.replace("Welcome to antechamber", "")
566-
567-
# Extract the version and convert to float.
568-
version = float(string.split(":")[0])
569-
570-
# The version is okay, enable Open Force Field support.
571-
if version >= 22:
572-
is_compatible = True
573-
# Disable Open Force Field support.
574-
else:
575-
is_compatible = False
576-
577-
del _shlex
578-
del _subprocess
579-
580-
# Something went wrong, disable Open Force Field support.
581-
except:
582-
is_compatible = False
583-
raise
584-
585-
if not is_compatible:
586-
raise _IncompatibleError(f"'{forcefield}' requires Antechamber >= 22.0")
587-
588537
# Validate arguments.
589538

590539
if not isinstance(molecule, (_Molecule, str)):

python/BioSimSpace/Sandpit/Exscientia/Parameters/_parameters.py

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -534,57 +534,6 @@ def _parameterise_openff(
534534
"must be in your PATH."
535535
) from None
536536

537-
# Check the Antechamber version. Open Force Field requires Antechamber >= 22.0.
538-
try:
539-
# Antechamber returns an exit code of 1 when requesting version information.
540-
# As such, we wrap the call within a try-except block in case it fails.
541-
542-
import shlex as _shlex
543-
import subprocess as _subprocess
544-
545-
# Generate the command-line string. (Antechamber must be in the PATH,
546-
# so no need to use AMBERHOME.
547-
command = "antechamber -v"
548-
549-
# Run the command as a subprocess.
550-
proc = _subprocess.run(
551-
_Utils.command_split(command),
552-
shell=False,
553-
text=True,
554-
stdout=_subprocess.PIPE,
555-
stderr=_subprocess.STDOUT,
556-
)
557-
558-
# Get stdout and split into lines.
559-
lines = proc.stdout.split("\n")
560-
561-
# If present, version information is on line 1.
562-
string = lines[1]
563-
564-
# Delete the welcome message.
565-
string = string.replace("Welcome to antechamber", "")
566-
567-
# Extract the version and convert to float.
568-
version = float(string.split(":")[0])
569-
570-
# The version is okay, enable Open Force Field support.
571-
if version >= 22:
572-
is_compatible = True
573-
# Disable Open Force Field support.
574-
else:
575-
is_compatible = False
576-
577-
del _shlex
578-
del _subprocess
579-
580-
# Something went wrong, disable Open Force Field support.
581-
except:
582-
is_compatible = False
583-
raise
584-
585-
if not is_compatible:
586-
raise _IncompatibleError(f"'{forcefield}' requires Antechamber >= 22.0")
587-
588537
# Validate arguments.
589538

590539
if not isinstance(molecule, (_Molecule, str)):

0 commit comments

Comments
 (0)