没有项目描述
airssp的Python项目详细描述
AirSpy
帮助使用从头开始随机结构搜索(AIRSS)的包 使用原子模拟环境(ase)。 airs是一个在gplv2下授权的开源代码, 此包不包含任何airs源代码,也不包含指向它的链接。
这是什么
- 允许使用ase的
atoms
接口为airs准备种子 - 允许ASE的计算器在空中使用以进行放松
以交互方式尝试
交互式jupyter笔记本示例可以在examples
文件夹中找到。
单击上面的binder徽章,在预先构建的环境中启动这些示例并在浏览器中进行尝试!
要求
- ase:原子模拟环境
- castepinput:用于CASTEP的输入文件的轻量级编写器/读取器。
用法
假设您熟悉python和airs的一些基本知识。 为生成sensible随机结构准备种子:
from airsspy import SeedAtoms
seed = SeedAtoms('C6')
seed.buiid.varvol = 20
seed.build.symmops = (2, 4)
# Can also access per `atom` tags/ketwords just like in ASE
for i in range(0, 6, 2):
atom = seed[i]
atom.tagname = 'CX'
atom.posamp = 2
将种子文件写入磁盘:
atoms.write_seed('C6.cell')
# With IPython
# Use the buildcell executable to generate the file
!buildcell < C6.cell > C6-rand.cell
为了生成一个细胞,我们可以创建一个Buildcell
实例,
这有助于包装airs的buildcell
程序:
from airsspy import Buildcell
buidcell = Buildcell(seed)
random_atoms = builcell.generate()
快捷方式也可用作SeedAtoms
:
random_atoms = seed.build_random_atoms()
限制
由于python 2.7中缺少timeout
参数,
与buildcell
的通信不可用。因此,直接发电和
python不支持随机结构的检索。然而,它是
仍然可以写出种子并从外部调用程序。