GithubHelp home page GithubHelp logo

abelcarreras / posym Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 4.0 512 KB

Point symmetry analysis tool for theoretical chemistry objects

License: MIT License

Python 81.17% C 18.83%
continuous normal-modes operator point-symmetry python quantum-chemistry symmetry wave-function

posym's People

Contributors

abelcarreras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

posym's Issues

Troubles with water.

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?

Example of methane

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?

Determination of the symmetry of normal modes seems uncertain

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

Infinite rotation axes

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?

Sampling sphere with 3 parameters?

for angles in itertools.product(ranges, ranges, ranges):

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.