[ase-users] ase-users Digest, Vol 153, Issue 23

John Kitchin jkitchin at andrew.cmu.edu
Tue Mar 23 15:24:23 CET 2021


>
>
>    3. Re: getting molecule symmetry number for thermochemistry
>       (Offermans Willem)
>
>
> ----------------------------------------------------------------------
>
> Message: 3
> Date: Tue, 23 Mar 2021 09:20:30 +0000
> From: Offermans Willem <willem.offermans at vito.be>
> To: ase-users <ase-users at listserv.fysik.dtu.dk>
> Subject: Re: [ase-users] getting molecule symmetry number for
>         thermochemistry
> Message-ID: <89BCBDC8-8551-4038-AD13-F1393AC881BE at VITO.be>
> Content-Type: text/plain; charset="utf-8"
>
> Hi John and ASE friends,
>
> Thank you for your feedback and example. It is very much appreciated.
>
> Unfortunately, if I try your example, I got following error:
>
> <snip>
> from ase.build import molecule
> from pymatgen.symmetry.analyzer import PointGroupAnalyzer
> benzene = molecule('C6H6')
> PointGroupAnalyzer(molecule(benzene.symbols,
> benzene.positions)).get_pointgroup()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/home/loffermw/.conda/envs/molecularmodelling/lib/python3.9/site-packages/ase/build/molecule.py",
> line 40, in molecule
>     if name in extra:
> TypeError: unhashable type: ?Symbols'
> </snip>
>
> You used: "PointGroupAnalyzer(Molecule(??. I guess the capital M is a
> typo. At least, I changed it to a lower m.
> However I do not believe it is related to the above error.
>
> Can someone help me to debug and resolve the Error?
>
>
I forgot one import line in the example, here is the code that works for
me.  The capital M was not a typo, it is a pymatgen object.

from pymatgen.core import Molecule
from ase.build import molecule
from pymatgen.symmetry.analyzer import PointGroupAnalyzer

benzene = molecule('C6H6')

PointGroupAnalyzer(Molecule(benzene.symbols,
benzene.positions)).get_pointgroup()

This example also works:

from pymatgen.io.ase import AseAtomsAdaptor
from ase.build import molecule
from pymatgen.symmetry.analyzer import PointGroupAnalyzer

benzene = molecule('C6H6')
PointGroupAnalyzer(AseAtomsAdaptor.get_molecule(benzene)).get_pointgroup()


>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210323/c34ade7c/attachment.htm>


More information about the ase-users mailing list