Skip to content

Commit

Permalink
fixed tm implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lmseidler committed Jan 17, 2025
1 parent 47b9acc commit 57b6001
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/mindlessgen/qm/tm.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def __init__(
def optimize(
self,
molecule: Molecule,
ncores: int,
max_cycles: int | None = None,
verbosity: int = 1,
) -> Molecule:
Expand All @@ -67,7 +68,7 @@ def optimize(
f.write(tm_input)

# Setup the turbomole optimization command including the max number of optimization cycles
arguments = [f"PARNODES=1 {self.jobex_path} -c {max_cycles}"]
arguments = [f"PARNODES={ncores} {self.jobex_path} -c {max_cycles}"]
if verbosity > 2:
print(f"Running command: {' '.join(arguments)}")

Expand All @@ -87,7 +88,7 @@ def optimize(
optimized_molecule.read_xyz_from_coord(coordfile)
return optimized_molecule

def singlepoint(self, molecule: Molecule, verbosity: int = 1) -> str:
def singlepoint(self, molecule: Molecule, ncores: int, verbosity: int = 1) -> str:
"""
Perform a single point calculation using Turbomole.
"""
Expand All @@ -109,7 +110,7 @@ def singlepoint(self, molecule: Molecule, verbosity: int = 1) -> str:
f.write(tm_input)

# set up the turbomole single point calculation command
run_tm = [f"PARNODES=1 {self.ridft_path}"]
run_tm = [f"PARNODES={ncores} {self.ridft_path}"]
if verbosity > 2:
print(f"Running command: {' '.join(run_tm)}")

Expand All @@ -126,7 +127,7 @@ def singlepoint(self, molecule: Molecule, verbosity: int = 1) -> str:
return tm_log_out

def check_gap(
self, molecule: Molecule, threshold: float, verbosity: int = 1
self, molecule: Molecule, ncores: int, threshold: float, verbosity: int = 1
) -> bool:
"""
Check if the HL gap is larger than a given threshold.
Expand Down

0 comments on commit 57b6001

Please sign in to comment.