Skip to content

Commit

Permalink
rebase master
Browse files Browse the repository at this point in the history
added set alpha/beta occupancies to play with occupied/empty orbtials
added density results and axes/center optimization results from wfnsympy
modified normal modes to improve the example
updated version
  • Loading branch information
efrembernuz committed Jul 29, 2020
1 parent 85446cb commit bed8bfb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 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.2'
__version__ = '0.8.3'

from cosymlib.molecule import Molecule, Geometry
from cosymlib import file_io
Expand Down
6 changes: 6 additions & 0 deletions cosymlib/molecule/electronic_structure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ def __init__(self,
for i in range(self._multiplicity-1):
self._beta_occupancy.append(0)

def set_alpha_occupancy(self, occupancy):
self._alpha_occupancy = occupancy

def set_beta_occupancy(self, occupancy):
self._beta_occupancy = occupancy

@property
def charge(self):
return self._charge
Expand Down
12 changes: 12 additions & 0 deletions cosymlib/symmetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ def wf_ideal_group_table(self, group):
'labels': results.SymLab,
'table': results.ideal_gt}

def dens_measure(self, group):
results = self._get_wfnsym_results(group)
return {'labels': results.SymLab,
'csm': results.csm_dens,
'csm_coef': results.csm_dens_coef}

def axes(self, group):
results = self._get_wfnsym_results(group)
return {'center' : results.center,
'axis': results.axis,
'axis2': results.axis2}

# Old method to be deleted
def symmetry_overlap_analysis(self, group, vector_axis1, vector_axis2, center):
results = self._get_wfnsym_results(group)
Expand Down
9 changes: 5 additions & 4 deletions examples/normal_modes_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ def get_nm_vibration_path(geometry, normal_mode, points=10, backward=False, k=1.
molecule = read_generic_structure_file('sf6.fchk')
freq, nm_martices = read_normal_modes_gaussian('sf6_freq.out')
k_points = 1.5
n_freq = 0
path = get_nm_vibration_path(molecule.geometry.get_positions(), nm_martices[0], k=k_points)
points = 10
n_freq = 1
path = get_nm_vibration_path(molecule.geometry.get_positions(), nm_martices[n_freq - 1], k=k_points)

x = np.linspace(k_points/10, k_points, 10)
output = open('sf6_freq{}.xyz'.format(n_freq+1), 'w')
x = np.linspace(k_points/points, k_points, points)
output = open('sf6_freq{}.xyz'.format(n_freq), 'w')
for ids, structure in enumerate(path):
xi = '{:.2f}'.format(x[ids]).replace('.', '')
txt = get_file_xyz_txt(Geometry(structure, symbols=molecule.geometry.get_symbols(), name='freq : ' + str(freq[0]) +
Expand Down

0 comments on commit bed8bfb

Please sign in to comment.