I am trying to run a single structure energy and force calculation on the Bucky ball catcher molecule from the MD22 dataset. It has 148 atoms. I am using the psi4 calculator through ASE. I am using the following function:
def main(filename, save_every=20, num_threads=32, memory=1000, start=0):
mol_name = filename.split('/')[-1].split('.')[0]
print(f'Calculating {mol_name} with {num_threads} threads!')
print(f'Saving every {save_every} steps.')
print(f'Loading {filename}...')
md17_asp = ase.io.read(filename, ':')
atoms = md17_asp[0]
props = ['DIPOLE', 'QUADRUPOLE', 'WIBERG_LOWDIN_INDICES', 'MAYER_INDICES']
calc = Psi4(atoms = atoms, method = 'wB97M-D3BJ', num_threads=num_threads, memory = f'{memory}MB', basis = 'def2-TZVPPD', properties=props, wcombine=False)
calc.psi4.gradient('wB97M-D3BJ/def2-TZVPPD', properties=props)
engs = []
forces = []
print('Starting 1000 calculations!')
for i in tqdm(range(start, 1000)):
a = md17_asp[i]
a.set_calculator(calc)
engs.append(a.get_potential_energy())
forces.append(a.get_forces())
where I set number of threads to 128 or 256 and the memory to 16 GB.
Eventually I get an error like the following:
==> Pre-Iterations <==
SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF (no occupation information).
-------------------------
Irrep Nso Nmo
-------------------------
A 4916 4827
-------------------------
Total 4916 4827
-------------------------
==> Iterations <==
Total Energy Delta E RMS |[F,P]|
slurmstepd: error: Detected 1 oom_kill event in StepId=25582113.0. Some of the step tasks have been OOM Killed.
srun: error: nid005211: task 0: Out Of Memory
srun: Terminating StepId=25582113.0
My psi version is 1.9.1. I have tried increasing the memory further but the process just seems to be stuck at some point. I don’t know if there is another way to speed this up / parallelize the calculation that could somehow get around the issue. At the moment, the calculation runs for 12+ hours on the first molecule and then gets killed at some point with the above message. This is my first time using psi4 so any help would be appreciated.
Thank you in advance!