/usr/share/pyshared/ase/test/bader.py is in python-ase 3.6.0.2515-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import os
from ase.structure import molecule
from ase.io.bader import attach_charges
fname = 'ACF.dat'
f = open(fname, 'w')
print >> f, """
# X Y Z CHARGE MIN DIST
----------------------------------------------------------------
1 7.0865 8.5038 9.0672 9.0852 1.3250
2 7.0865 9.9461 7.9403 0.4574 0.3159
3 7.0865 7.0615 7.9403 0.4574 0.3159
----------------------------------------------------------------
NUMBER OF ELECTRONS: 9.99999
"""
f.close()
atoms = molecule('H2O')
atoms.set_cell([7.5, 9, 9])
atoms.center()
attach_charges(atoms)
attach_charges(atoms, fname)
os.remove(fname)
for atom in atoms:
print 'Atom', atom.symbol, 'Bader charge', atom.charge
|