Skip to content

Commit

Permalink
Some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcarreras committed Mar 9, 2021
1 parent 8662be4 commit 097686a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
15 changes: 7 additions & 8 deletions cosymlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import numpy as np


def _get_symgroup_arguments(locals):
def _get_symmetry_arguments(locals):
kwargs = dict(locals)
del kwargs['self']
for element in ['self', 'output']:
Expand All @@ -25,7 +25,7 @@ def _get_symgroup_arguments(locals):
return kwargs


def get_table_format(labels, molecules_names, data):
def _get_table_format(labels, molecules_names, data):

txt = 'Structure'
max_len_name = 12
Expand Down Expand Up @@ -180,7 +180,7 @@ def print_shape_measure(self, shape_reference, central_atom=0, fix_permutation=F
else:
references_names.append(reference)

txt_shape = get_table_format(references_names, molecules_names, measure_list)
txt_shape = _get_table_format(references_names, molecules_names, measure_list)
output.write(txt_shape)

def print_shape_structure(self, shape_reference, central_atom=0, fix_permutation=False, output=sys.stdout):
Expand Down Expand Up @@ -224,7 +224,6 @@ def print_shape_structure(self, shape_reference, central_atom=0, fix_permutation
for geometry in geometries:
output.write(file_io.get_file_xyz_txt(geometry))

# TODO: Change name of all symgroup named functions
def print_geometric_measure_info(self, label, multi=1, central_atom=0, center=None, output=sys.stdout):
"""
Prints geometric symmetry measure verbose
Expand All @@ -240,7 +239,7 @@ def print_geometric_measure_info(self, label, multi=1, central_atom=0, center=No
:param output: Display hook
:type: hook
"""
kwargs = _get_symgroup_arguments(locals())
kwargs = _get_symmetry_arguments(locals())
sep_line = '..................................................\n'

txt = 'Evaluating symmetry operation : {}\n'.format(label)
Expand Down Expand Up @@ -291,7 +290,7 @@ def print_geometric_symmetry_measure(self, label, central_atom=0, center=None, o
:param output: Display hook
:type output: hook
"""
kwargs = _get_symgroup_arguments(locals())
kwargs = _get_symmetry_arguments(locals())

txt = 'Evaluating symmetry operation : {}\n \n'.format(label)
for idx, molecule in enumerate(self._molecules):
Expand Down Expand Up @@ -319,7 +318,7 @@ def print_symmetry_nearest_structure(self, label, central_atom=0, center=None, o
:param output: Display hook
:type output: hook
"""
kwargs = _get_symgroup_arguments(locals())
kwargs = _get_symmetry_arguments(locals())

for idm, molecule in enumerate(self._molecules):
geometry = molecule.geometry.get_symmetry_nearest_structure(**kwargs)
Expand All @@ -333,7 +332,7 @@ def print_chirality_measure(self, labels, central_atom=0, center=None, output=sy
for geometry in self.get_geometries()])

molecules_names = [molecule.name for molecule in self._molecules]
txt = get_table_format(labels, molecules_names, csm_list)
txt = _get_table_format(labels, molecules_names, csm_list)

output.write(txt)

Expand Down
19 changes: 0 additions & 19 deletions cosymlib/symmetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,22 +287,3 @@ def axes(self, group):
return {'center' : results.center,
'axis': results.axis,
'axis2': results.axis2}

# Old method to be deleted
def Osymmetry_overlap_analysis(self, group, vector_axis1, vector_axis2, center):
results = self._get_wfnsym_results(group)

return [results.ideal_gt, results.SymLab, results.mo_SOEVs_a,
results.mo_SOEVs_b, results.wf_SOEVs_a, results.wf_SOEVs_b,
results.wf_SOEVs, results.grim_coef, results.csm_coef]

# To be deleted
def Osymmetry_irreducible_representation_analysis(self, group, vector_axis1, vector_axis2, center):
results = self._get_wfnsym_results(group)
return [results.IRLab, results.mo_IRd_a, results.mo_IRd_b,
results.wf_IRd_a, results.wf_IRd_b, results.wf_IRd]

# To be deleted
def Oold_symmetry_matrix(self, group, vector_axis1, vector_axis2, center):
results = self._get_wfnsym_results(group)
return results.SymMat

0 comments on commit 097686a

Please sign in to comment.