Skip to content
Snippets Groups Projects
Commit a32953ee authored by Mikkel Strange's avatar Mikkel Strange
Browse files

fix merge conflict

parents f51b1dc3 dabe80e1
Branches
Tags
No related merge requests found
...@@ -26,7 +26,6 @@ def open_section(p, name): ...@@ -26,7 +26,6 @@ def open_section(p, name):
def c(value, unit=None): def c(value, unit=None):
""" Dummy function for unit conversion""" """ Dummy function for unit conversion"""
return value
return cu(value, unit) return cu(value, unit)
...@@ -85,7 +84,7 @@ def parse(filename): ...@@ -85,7 +84,7 @@ def parse(filename):
p.addArrayValues('atom_positions', c(r.atoms.positions, 'angstrom')) p.addArrayValues('atom_positions', c(r.atoms.positions, 'angstrom'))
p.addArrayValues('configuration_periodic_dimensions', p.addArrayValues('configuration_periodic_dimensions',
np.array(r.atoms.pbc, bool)) np.array(r.atoms.pbc, bool))
if hasattr(r.atoms, 'momenta'): if 'momenta' in r.atoms:
masses = atomic_masses[r.atoms.numbers] masses = atomic_masses[r.atoms.numbers]
velocities = r.atoms.momenta / masses.reshape(-1, 1) velocities = r.atoms.momenta / masses.reshape(-1, 1)
p.addArrayValues('atom_velocities', p.addArrayValues('atom_velocities',
...@@ -165,10 +164,10 @@ def parse(filename): ...@@ -165,10 +164,10 @@ def parse(filename):
unit='eV*angstrom**(-3)') unit='eV*angstrom**(-3)')
if hasattr(r.results, 'forces'): if 'forces' in r.results:
p.addArrayValues('atom_forces_free_raw', p.addArrayValues('atom_forces_free_raw',
c(r.results.forces, 'eV/angstrom')) c(r.results.forces, 'eV/angstrom'))
if hasattr(r.results, 'magmoms'): if 'magmons' in r.results:
p.addArrayValues('x_gpaw_magnetic_moments', p.addArrayValues('x_gpaw_magnetic_moments',
r.results.magmoms) r.results.magmoms)
p.addRealValue('x_gpaw_spin_Sz', r.results.magmoms.sum() / 2.0) p.addRealValue('x_gpaw_spin_Sz', r.results.magmoms.sum() / 2.0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment