Skip to content

Commit

Permalink
Added explicit memory specification in ORCA input files
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelRobidas committed Aug 25, 2022
1 parent 2c38703 commit 8049ecb
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ccinput/packages/orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, calc):
self.handle_custom_basis_sets()
self.handle_xyz()

self.handle_pal()
self.handle_pal_mem()
self.parse_custom_solvation_radii()
self.handle_solvation()

Expand Down Expand Up @@ -298,17 +298,20 @@ def handle_xyz(self):
lines = [i + "\n" for i in clean_xyz(self.calc.xyz).split("\n") if i != ""]
self.xyz_structure = "".join(lines)

def handle_pal(self):
def handle_pal_mem(self):
if self.calc.parameters.theory_level == "semiempirical":
self.pal = 1
self.mem_per_core = self.calc.mem
else:
self.pal = self.calc.nproc
self.mem_per_core = int(self.calc.mem / self.calc.nproc)

pal_block = f"""%pal
pal_mem_block = f"""%MaxCore {self.mem_per_core}
%pal
nprocs {self.pal}
end"""

self.blocks.append(pal_block)
self.blocks.append(pal_mem_block)

def parse_custom_solvation_radii(self):
for radius in self.calc.parameters.custom_solvation_radii.split(";"):
Expand Down

0 comments on commit 8049ecb

Please sign in to comment.