首页 > 解决方案 > PyIron+Sphinx 中的自旋约束

问题描述

我想限制大块原子的自旋,同时让我的超级单元的自由表面原子放松它们的磁矩。PyIron+SPhinx 是否可以限制超级胞中原子子集(不是全部)的自旋?

标签: pyiron

解决方案


是的,原则上可以:

from pyiron import Project
import numpy as np

spx = pr.create.job.Sphinx('spx')
spx.structure = pr.create.structure.bulk('Fe', a=2.83, cubic=True)
spx.structure.set_initial_magnetic_moments([2, 2])
spx.fix_spin_constraint = True
spx.structure.spin_constraint = np.array([True, False])
spx.calc_static()
spx.run()

简短说明:spx.fix_spin_constraint = True初始化属性spx.structure.spin_constraint,该属性仅包含True开头的所有原子。对于不应被约束的原子,您可以设置False.


推荐阅读