jszopi / repESP

Reproducing molecular ESP from partial charges and more
GNU General Public License v3.0
6 stars 7 forks source link

data print for charge differences in esp_fit.py #8

Closed ph265 closed 7 years ago

ph265 commented 7 years ago

I'd like to see more than just the difference between two atoms in the section Checking differences between raw and equivalenced charges ... perhaps a limit which I can change above which all differences are printed eg if absolute differences are greater than 0.01 they are printed

jszopi commented 7 years ago

The function call responsible for this part of output is compare_charges on line 207 of esp_fit.py. This function takes an optional parameter thresh, which will do exactly what you want, so you can just add it after a comma:

print(charges.compare_charges(esp_charge_type, 'resp', g.molecule,
      esp_equiv_molecule, thresh=0.01))

Note that you can set this parameter to 0 to show differences for all atoms.

Also note that the CLI script average.py incorporates this functionality with the --thresh option.