abelcarreras / posym Goto Github PK
View Code? Open in Web Editor NEWPoint symmetry analysis tool for theoretical chemistry objects
License: MIT License
Point symmetry analysis tool for theoretical chemistry objects
License: MIT License
The water molecule has the point group symmetry C2v. https://www.chemtube3d.com/sym-waterc2v/
However, if I analyse using the following script
from posym import SymmetryMoleculeBase
coordinates = [[0.00000, 0.0000000, -0.0808819],
[-1.43262, 0.0000000, -1.2823700],
[1.43262, 0.0000000, -1.2823700]]
symbols = ['O', 'H', 'H']
def analyse_geometry() -> None:
"""."""
for group in ('Td', 'C2v', 'C3v', 'C4v'):
sym_geom = SymmetryMoleculeBase(group=group, coordinates=coordinates, symbols=symbols)
print(f'Symmetry measure {group}: ', sym_geom.measure)
if __name__ == '__main__':
analyse_geometry()
I get the largest weight on Td and zero! weight on C2v:
>> python posym_test.py
Symmetry measure Td: 62.39356218748866
Symmetry measure C2v: 0.0
Symmetry measure C3v: 18.992456339028262
Symmetry measure C4v: 18.992456339028262
I interpret that posym
suggests that Td would be the symmetry group of water. Is this correct interpretation? How to analyse and get the textbook symmetry group?
Maybe I still don't understand the CSM, for example when analysing the symmetries of methane, I expected to have zero for Td and a large number for everything else.
However, this script
from posym import SymmetryMoleculeBase
from pointgroup import PointGroup
coordinates = [[0.0000000000, 0.0000000000, 0.0000000000],
[0.5541000000, 0.7996000000, 0.4965000000],
[0.6833000000, -0.8134000000, -0.2536000000],
[-0.7782000000, -0.3735000000, 0.6692000000],
[-0.4593000000, 0.3874000000, -0.9121000000]]
symbols = ['C', 'H', 'H', 'H', 'H']
def analyse_geometry() -> None:
"""."""
pg = PointGroup(positions=coordinates,
symbols=symbols)
print('Point group: ', pg.get_point_group())
for group in ('Td', 'C2v', 'C3v', 'C4v'):
sym_geom = SymmetryMoleculeBase(group=group, coordinates=coordinates, symbols=symbols)
print(f'Symmetry measure {group}: ', sym_geom.measure)
if __name__ == '__main__':
analyse_geometry()
produces the following output
Point group: Td
Symmetry measure Td: 2.179883829001028e-07
Symmetry measure C2v: 1.6308008277121644e-07
Symmetry measure C3v: 1.7841730759471375e-06
Symmetry measure C4v: 10.865389103524326
Is this normal?
The list of arrays sub_matrices_indices could be computed just once and cached.
I got this to work here
https://github.com/kovalp/posym-normal-modes/blob/master/src/posym_normal_modes/permutations.py
It brings a factor 1.5 speedup.
Hi. First of all, awesome code! I have long searched for a code capable of determining the symmetries of the normal modes.
I'm trying to use the code to assign the symmetries of the normal modes of vibration of the fullerene C60. The normal modes were calculated by DFT with ORCA.
Here is the hessian file containing the coordinates, symbols, normal modes and frequencies.
FRQ_c60_f_PBE.hess.txt
Here is the parser used by my script to extract the data
hess_parser.py.txt
And here is my python script.
#!/usr/bin/python3
from hess_parser import HessianData
from posym import SymmetryModes
# LOCAL VARIABLES
HESSPATH = './FRQ_c60_f_PBE.hess'
hessian = HessianData(HESSPATH)
gr='Ih'
coordinates = hessian.atoms
symbols = hessian.symbol
normal_modes = hessian.normal_modes[6:]
frequencies = hessian.freq[6:]
sym_modes_gs = SymmetryModes(group=gr, coordinates=coordinates, \
modes=normal_modes, symbols=symbols)
for i in range(len(normal_modes)):
print('Mode {:2}: {:8.3f} :'.format(i + 7, frequencies[i]), \
sym_modes_gs.get_state_mode(i))
print('Total symmetry: ', sym_modes_gs)
The problem is that when assigning, there seems to be uncertainty for some modes. See for example modes 12, 13 and 14 in this extract of the result.
Mode 7: 257.019 : 0.2 Hg
Mode 8: 257.064 : 0.2 Hg
Mode 9: 257.076 : 0.2 Hg
Mode 10: 257.510 : 0.2 Hg
Mode 11: 257.532 : 0.2 Hg
Mode 12: 333.111 : - 0.12 Ag - 0.06 T1g - 0.06 T2g + 0.12 Gg - 0.07 Au + 0.13 T1u + 0.13 T2u + 0.07 Gu
Mode 13: 333.165 : - 0.12 Ag - 0.06 T1g - 0.06 T2g + 0.12 Gg - 0.07 Au + 0.13 T1u + 0.13 T2u + 0.07 Gu
Mode 14: 333.173 : - 0.12 Ag - 0.06 T1g - 0.06 T2g + 0.12 Gg - 0.07 Au + 0.13 T1u + 0.13 T2u + 0.07 Gu
Mode 15: 343.869 : 0.25 Gu
Mode 16: 345.617 : 0.25 Gu
Mode 17: 345.702 : 0.25 Gu
Mode 18: 345.738 : 0.25 Gu
...
I tried to solve the problem by myself, but not finding the source of it I'm reporting it
Best,
Emmanuel
First of all, I enjoyed the package a lot. I started my derivative of it in order to split the package into smaller pieces and achieve a pure Python software.
Second, I would be nice to have links to the theory of the method mentioned in the Readme.
Would this be https://pubs.acs.org/doi/pdf/10.1021/ja00046a033 ? Or there are better references?
Finally for this issue, forgive my eventual ignorance, but are the infinite rotation axes analysable within the method of continuous symmetry measures?
I could not analyse the group D*h (Dโh). I guess there is a difficulty related to this group.
Is it possible to detect this symmetry in the method? Is it possible to apply this symmetry group to the normal mode analysis?
Line 217 in 7fcd034
This bothers me a lot, but I did not try to solve this yet. Maybe you can explain my eventual confusion...
Essentially, I think you are rotating the coordinates sampling all orientations on a sphere. Why to do this with 3 degrees of freedom if the sphere has only two degrees of freedom? I guess that the same can be achieved with spherical coordinates theta and phi. If this is not perfect enough, then one could use Lebedev samplings (Lebedev-Laikov grids). My take on the Lebedev-Laikov grids is here https://gitlab.com/kovalp/qc-quad
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.