Chain
#include "Spirit/Chain.h"
A chain of spin systems can be used for example for * calculating minimum energy paths using the GNEB method * running multiple (e.g. LLG) calculations in parallel
Change the active image
-
bool Chain_next_Image(State *state, int idx_chain = -1)
Move to next image in the chain (change active_image).
- Returns:
success of the function
Insert/replace/delete images
-
void Chain_Set_Length(State *state, int n_images, int idx_chain = -1)
Set the number of images in the chain.
If it is currently less, a corresponding number of images will be appended. If it is currently more, a corresponding number of images will be deleted from the end.
Note: you need to have an image in the clipboard.
-
void Chain_Image_to_Clipboard(State *state, int idx_image = -1, int idx_chain = -1)
Copy an image from the chain (default: active image).
You can later insert it anywhere in the chain.
-
void Chain_Replace_Image(State *state, int idx_image = -1, int idx_chain = -1)
Replaces the specified image (default: active image).
Note: you need to have an image in the clipboard.
-
void Chain_Insert_Image_Before(State *state, int idx_image = -1, int idx_chain = -1)
Inserts an image in front of the specified image index (default: active image).
Note: you need to have an image in the clipboard.
-
void Chain_Insert_Image_After(State *state, int idx_image = -1, int idx_chain = -1)
Inserts an image behind the specified image index (default: active image).
Note: you need to have an image in the clipboard.
-
void Chain_Push_Back(State *state, int idx_chain = -1)
Appends an image to the chain.
Note: you need to have an image in the clipboard.
Calculate data
-
void Chain_Get_Rx(State *state, scalar *Rx, int idx_chain = -1)
Fills an array with the reaction coordinate values of the images in the chain.
-
void Chain_Get_Rx_Interpolated(State *state, scalar *Rx_interpolated, int idx_chain = -1)
Fills an array with the interpolated reaction coordinate values along the chain.
-
void Chain_Get_Energy(State *state, scalar *energy, int idx_chain = -1)
Fills an array with the energy values of the images in the chain.
-
void Chain_Get_Energy_Interpolated(State *state, scalar *E_interpolated, int idx_chain = -1)
Fills an array with the interpolated energy values along the chain.