From a6bc29e958fc38975b38e32d36502b45b43bdce0 Mon Sep 17 00:00:00 2001 From: Abdallah Ammar Date: Thu, 31 Oct 2024 11:16:55 +0100 Subject: [PATCH] avoid rm error message if file does not exist --- PyDuck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyDuck.py b/PyDuck.py index 3343c0d..fa5922a 100644 --- a/PyDuck.py +++ b/PyDuck.py @@ -95,7 +95,7 @@ dipole = mol.intor('int1e_r') #Matrix elements of the x, y, z operators x,y,z = dipole[0],dipole[1],dipole[2] norb = len(ovlp) # nBAS_AOs -subprocess.call(['rm', working_dir + '/int/nBas.dat']) +subprocess.call(['rm', '-f', working_dir + '/int/nBas.dat']) f = open(working_dir+'/int/nBas.dat','w') f.write(" {} ".format(str(norb))) f.close()