From e0cee99d02eb463e15eb4b777b09b96f70c7b22a Mon Sep 17 00:00:00 2001 From: Abdallah Ammar Date: Thu, 31 Oct 2024 11:12:18 +0100 Subject: [PATCH] absolute path for mkdir --- PyDuck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PyDuck.py b/PyDuck.py index b47914a..3343c0d 100644 --- a/PyDuck.py +++ b/PyDuck.py @@ -70,7 +70,7 @@ nelec=mol.nelec #Access the number of electrons nalpha=nelec[0] nbeta=nelec[1] -subprocess.call(['mkdir', '-p', 'input']) +subprocess.call(['mkdir', '-p', working_dir+'/input']) f = open(working_dir+'/input/molecule','w') f.write('# nAt nEla nElb nCore nRyd\n') f.write(str(mol.natm)+' '+str(nalpha)+' '+str(nbeta)+' '+str(0)+' '+str(0)+'\n') @@ -80,7 +80,7 @@ for i in range(len(list_pos_atom)): f.close() #Compute nuclear energy and put it in a file -subprocess.call(['mkdir', '-p', 'int']) +subprocess.call(['mkdir', '-p', working_dir+'/int']) subprocess.call(['rm', '-f', working_dir + '/int/ENuc.dat']) f = open(working_dir+'/int/ENuc.dat','w') f.write(str(mol.energy_nuc()))