jkitchin / jasp

python enhancements of ase.calculators.vasp
Other
27 stars 13 forks source link

add try/except in get_dipole_moment to catch empty/missing CHG file #43

Closed prtkm closed 9 years ago

prtkm commented 9 years ago

Hi John,

I added some code to catch errors in get_dipole_moment to get it to work with view when,

  1. it is called outside the context manager, and the CHG file is not present.
  2. it is called inside the context manager, but the CHG file is empty because lcharg is False

Prateek