[ase-users] ase-users Digest, Vol 153, Issue 23
Offermans Willem
willem.offermans at vito.be
Tue Mar 23 15:51:17 CET 2021
Dear John and ASE friends,
Thank you once more for your input.
Now it works:
<snip>
>>> 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()
D6h
</snip>
cute :)
Met vriendelijke groeten,
Mit freundlichen Grüßen,
With kind regards,
Willem Offermans
Researcher Electrocatalysis SCT
VITO NV | Boeretang 200 | 2400 Mol
Phone:+32(0)14335263 Mobile:+32(0)492182073
Willem.Offermans at Vito.be
> On 23 Mar 2021, at 15:24, John Kitchin via ase-users <ase-users at listserv.fysik.dtu.dk> wrote:
>
>
> 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 <mailto:willem.offermans at vito.be>>
> To: ase-users <ase-users at listserv.fysik.dtu.dk <mailto: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()
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210323/f48be4cb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vito.jpg
Type: image/jpeg
Size: 15232 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210323/f48be4cb/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3953 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210323/f48be4cb/attachment-0001.p7s>
More information about the ase-users
mailing list