Exemplo n.º 1
0
def configurations(p_state):
    ### Copy the system a few times
    chain.Image_to_Clipboard(p_state)
    for number in range(1, 7):
        chain.Insert_Image_After(p_state)
    noi = chain.Get_NOI(p_state)

    ### Read Image from file
    # Configuration_from_File(state.get(), spinsfile, 0);
    ### Read Chain from file
    # Chain_from_File(state.get(), chainfile);

    ### First image is homogeneous with a Skyrmion at pos
    configuration.PlusZ(p_state, idx_image=0)
    configuration.Skyrmion(p_state, 5.0, phase=-90.0, idx_image=0)
    ### Last image is homogeneous
    configuration.PlusZ(p_state, idx_image=noi - 1)

    # spinsfile = "input/spins.txt"
    # io.Image_Read(p_state, spinsfile)

    ### Create transition of images between first and last
    transition.Homogeneous(p_state, 0, noi - 1)
Exemplo n.º 2
0
 def setUp(self):
     ''' Setup a p_state and copy it to Clipboard'''
     self.p_state = p_state
     chain.Insert_Image_After(self.p_state)  # image 1st
     chain.Insert_Image_After(self.p_state)  # image 2nd
     chain.Insert_Image_After(self.p_state)  # image 3rd