4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 20:35:36 +01:00

avoid rm error message if file does not exist

This commit is contained in:
Abdallah Ammar 2024-10-31 11:16:55 +01:00
parent e0cee99d02
commit a6bc29e958

View File

@ -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()