Skip to content

Commit

Permalink
Lig dissociation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgt16-LANL committed Jan 10, 2025
1 parent 9dae795 commit 493d920
Show file tree
Hide file tree
Showing 7 changed files with 3,600 additions and 1,907 deletions.
1 change: 1 addition & 0 deletions architector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
)

from architector.io_molecule import convert_io_molecule
from architector.io_calc import CalcExecutor
18 changes: 10 additions & 8 deletions architector/arch_xtb_text_ase_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ def calculate(self, atoms=None, *args, **kwargs):
file1.write(" gbsa=true\n")

# Run xtb
execStr = "{} structure.xyz {} --chrg {} --uhf {} --alpb {} -P 1 -a {} --etemp {} --iterations {} --grad -I solv_options.txt".format(
execStr = ("{} structure.xyz {} --chrg {} "
" --uhf {} --alpb {} -a {} "
"--etemp {} --iterations {} "
"--grad -I solv_options.txt").format(
xtbPath,
methods_dict[self.parameters.get("xtb_method", "GFN2-xTB")],
int(charge),
Expand All @@ -98,7 +101,9 @@ def calculate(self, atoms=None, *args, **kwargs):
self.parameters["xtb_max_iterations"],
)
else:
execStr = "{} structure.xyz {} --chrg {} --uhf {} -P 1 -a {} --etemp {} --iterations {} --grad".format(
execStr = ("{} structure.xyz {} --chrg {}"
" --uhf {} -a {} --etemp {}"
" --iterations {} --grad").format(
xtbPath,
methods_dict[self.parameters.get("xtb_method", "GFN2-xTB")],
int(charge),
Expand All @@ -108,11 +113,8 @@ def calculate(self, atoms=None, *args, **kwargs):
self.parameters["xtb_max_iterations"],
)

with open('output.xtb', 'w') as file1:
sub.run(
execStr.split(), check=True,
stderr=sub.DEVNULL, stdout=file1
)
with open("output.xtb", "w") as file1:
sub.run(execStr.split(), check=True, stderr=sub.DEVNULL, stdout=file1)

outpath = pathlib.Path(".")

Expand Down Expand Up @@ -151,7 +153,7 @@ def read_solv_params(self, outfilelines):
pass
gsolv = None
for line in lines:
if ("Gsolv" in line) and ('w/o' not in line):
if ("Gsolv" in line) and ("w/o" not in line):
gsolv = float(line.split()[3]) * units.Ha
break
hl_gap = None
Expand Down
Loading

0 comments on commit 493d920

Please sign in to comment.