Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions qp/analyze/multiwfn.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def iterate_qm_output(pdb_all, method, base_output_dir, multiwfn_path, settings_
# Copy the atmrad dir and settings.ini into the current working directory
atmrad_dest_path = os.path.join(scr_dir_path, 'atmrad/')
if not os.path.exists(atmrad_dest_path):
shutil.copytree(atmrad_path, atmrad_dest_path)
shutil.copytree(atmrad_path, atmrad_dest_path, dirs_exist_ok=True)

settings_ini_dest_path = os.path.join(scr_dir_path, 'settings.ini')
shutil.copy(settings_ini_path, settings_ini_dest_path)
Expand All @@ -71,8 +71,11 @@ def iterate_qm_output(pdb_all, method, base_output_dir, multiwfn_path, settings_
if molden_files:
molden_file = os.path.basename(molden_files[0])
task_function(scr_dir_path, molden_file, multiwfn_path, charge_scheme)
shutil.rmtree('atmrad/') # Delete the atmrad directory when done
os.remove('settings.ini') # Delete the settings.ini file when done
shutil.rmtree('atmrad/', ignore_errors=True)
try:
os.remove('settings.ini')
except FileNotFoundError:
pass
else:
print(f"> WARNING: No molden file in {scr_dir_path}")
os.chdir(original_dir)
Expand Down
2 changes: 1 addition & 1 deletion qp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def analyze(config):
calc_charge_schemes = config_data.get('calc_charge_schemes', False)
calc_dipole = config_data.get('calc_dipole', False)
multiwfn_path = config_data.get('multiwfn_path', 'Multiwfn')
charge_scheme = config_data.get('charge_scheme', 'Hirshfeld-I')
charge_scheme = config_data.get('charge_scheme', 'Hirshfeld')
input = config_data.get('input', [])
output = config_data.get('output_dir', '')
center_yaml_residues = config_data.get('center_residues', [])
Expand Down
Loading