[ase-users] set_initial_magnetic_moments not working in loop?
Offermans Willem
willem.offermans at vito.be
Fri Jun 5 08:58:39 CEST 2020
Dear Christoph,
I’m not familiar with magnetic_moments at all, but one can easily check the properties of objects like atom object:
https://wiki.fysik.dtu.dk/ase/ase/atom.html
I would bet that magmom is something you should have a closer look at.
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<mailto:Willem.Offermans at Vito.be>
[cid:982BA063-B96A-4A1B-89AB-5A01CA9FC70D at vito.local]
On 5 Jun 2020, at 08:34, Christoph Wolf via ase-users <ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>> wrote:
Dear all,
I have a molecule as Atoms object, I was trying to loop through all atoms in that molecule to set the magnetic moment on only one of the species but ase does not seem to allow that:
molecule=ase.build.molecule('methylenecyclopropane')
molecule.set_initial_magnetic_moments([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
for atom in molecule:
if atom.symbol == 'C':
print(atom.index)
atom.set_initial_magnetic_moments([1.0])
Traceback (most recent call last):
File "test_magmom.py", line 21, in <module>
atom.set_initial_magnetic_moments([0.1])
AttributeError: 'Atom' object has no attribute 'set_initial_magnetic_moments'
Is there a way to do this?
Thanks in advance and have a great weekend everyone!
Chris
--
Postdoctoral Researcher
Center for Quantum Nanoscience, Institute for Basic Science
Ewha Womans University, Seoul, South Korea
_______________________________________________
ase-users mailing list
ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.fysik.dtu.dk%2Fmailman%2Flistinfo%2Fase-users&data=02%7C01%7CWillem.Offermans%40vito.be%7C5b898f3ff7b7414f9f5f08d8091c1003%7C9e2777ed82374ab992782c144d6f6da3%7C0%7C0%7C637269363416533749&sdata=MQEvFHLcHgsRwvMtdhpPYLMdpQSGa1rt%2B4snvQWBulU%3D&reserved=0
VITO Disclaimer: http://www.vito.be/e-maildisclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200605/fe022813/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vito.jpg
Type: image/jpeg
Size: 15232 bytes
Desc: vito.jpg
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200605/fe022813/attachment-0001.jpg>
More information about the ase-users
mailing list