spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Which command in input.cfg controls Skyrmion in a homogeneous background? #553

Closed thu-wangz17 closed 4 years ago

thu-wangz17 commented 4 years ago

Hi. I want to change the initial configuration by inserting a Skyrmion into a homogeneous background. But I don't konw which command in input file controls it? I write the following code to judge the difference between input.cfg which don't set skyrmion background and input_skyrmion.cfg,but find the only difference is the random seed.

from spirit import state, simulation

def skyrmion_on_homogeneous(p_state):
    from spirit import configuration
    configuration.plus_z(p_state)
    configuration.skyrmion(p_state, 5.0, phase=-90.0)

with state.State("input.cfg") as p_state:
    state.to_config(p_state, './input.cfg')
    skyrmion_on_homogeneous(p_state)
    state.to_config(p_state, './input_skyrmion.cfg')
MSallermann commented 4 years ago

Hey. The input file does not support any syntax to control the initial configuration. Using the functions from configuration.py, as you show, is the best way to set a skyrmion.

thu-wangz17 commented 4 years ago

Ok.Thank you very much.