Skip to content

Commit

Permalink
added new keys in wfnsympy results to accept different occupancies wi…
Browse files Browse the repository at this point in the history
…th the same group and axis

updated version
  • Loading branch information
efrembernuz committed Aug 5, 2020
1 parent 105f8dc commit a6031ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cosymlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.8.5'
__version__ = '0.8.6'

from cosymlib.molecule import Molecule, Geometry
from cosymlib import file_io
Expand Down
9 changes: 6 additions & 3 deletions cosymlib/symmetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ def _get_key_symgroup(label, center, central_atom, connectivity, multi, connect_
return group_key, center_key, central_atom_key, connectivity_key, multi_key, connect_thresh_key


def _get_key_wfnsym(group, vector_axis1, vector_axis2, center):
def _get_key_wfnsym(group, vector_axis1, vector_axis2, center, alpha_occupancy, beta_occupancy):
group_key = group.lower()
vec1_key = ' '.join(['{:10.8f}'.format(n) for n in vector_axis1]) if vector_axis1 is not None else None
vec2_key = ' '.join(['{:10.8f}'.format(n) for n in vector_axis2]) if vector_axis2 is not None else None
center_key = ' '.join(['{:10.8f}'.format(n) for n in center]) if center is not None else None
return group_key, vec1_key, vec2_key, center_key
alpha_occupancy_key = ' '.join(['{:10.8f}'.format(n) for n in alpha_occupancy]) if alpha_occupancy is not None else None
beta_occupancy_key = ' '.join(['{:10.8f}'.format(n) for n in beta_occupancy]) if beta_occupancy is not None else None
return group_key, vec1_key, vec2_key, center_key, alpha_occupancy_key, beta_occupancy_key


class Symmetry:
Expand Down Expand Up @@ -101,7 +103,8 @@ def _get_symgroup_results(self, group):

def _get_wfnsym_results(self, group):

key = _get_key_wfnsym(group, self._axis, self._axis2, self._center)
key = _get_key_wfnsym(group, self._axis, self._axis2, self._center, self._electronic_structure.alpha_occupancy,
self._electronic_structure.beta_occupancy)

if key not in self._results:
self._results[key] = WfnSympy(coordinates=self._coordinates,
Expand Down

0 comments on commit a6031ad

Please sign in to comment.