Skip to content

Add options to bader IO

Using the most recent version (0.28a) of the bader code on CHGCAR files contained the all-electron density produces several unexpected results.

The positions in the Bader output are in Angstrom already causing a displacements error with

atoms = read('POSCAR')
attach_charges(atoms, 'ACF.dat')

So one must manually convert their atoms object units. The new option bader_units = 'Angstrom' or 'Bohr' allows

attach_charges(atoms, 'ACF.dat', bader_units='Angstrom') 

Additionally the attach_charge method returns atom.number - charge_from_bader when in some cases one may want simply the bader values alone. The new option total_electrons=True would set atom.charge as the bader value.

Merge request reports