Author: Rajgowrav Cheenikundil, Orebro University.
ASD2VTK is a Python script that enables easy conversion of Atomistic Spin Dynamics (ASD) simulation data from UppASD simulations to Visualization Toolkit (VTK) files, for visualization in software such as ParaView. This tool simplifies the process of generating VTK files, allowing users to visualize atomistic simulation results efficiently.
- Converts UppASD simulation outputs (coord..out and restart..out) to VTK files.
- Python 3.x
- VTK library (
pip install vtk --user
) - ParaView installed for visualization
-
Ensure that the UppASD simulation outputs, "coord..out" and "restart..out," "moment.*.output" etc are in the same directory as the script.
-
Run the Python script "ASD2VTK.py" followed by the input file name and the tool-name in the directory containing the aforementioned simulation outputs.
python ASD2VTK.py inputfile source-tool-name
example
python ASD2VTK.py moment.bcc_Fe.out uppasd
deffault is restart.*.out and UppASD
-
The script will generate a VTU file named "v_*.vtu" in the same directory.
-
Open the output file with Paraview and click on "Apply"
-
In ParaView, choose
Cell_vector_3D
as the visualization field -
If you want to plot the magnetization with arrows, choose the "Glyph" tool in Paraview, and choose
Cell_Vector_3D
as the orientation array.
( The outputs written using version 1.0 of ASD2VTK.py are tested and working/opening without errors on Paraview version 5.11.0 on Ubuntu version 23 )
Note:
- Make sure that there is only one "coord..out" and one "restart..out" file in the running directory.
- The number of points in the VTU file will be 8 times the number of atoms, as 8 points are needed for each cube.
Please share and cite this repository if you find this tool useful.
@misc{ASD2VTK,
title = {{ASD2VTK}},
howpublished = {\url{https://github.com/karpathyan/ASD2VTK}},
author = {Rajgowrav Cheenikundil},
year = {2024},
note = {Accessed on: Date of access},
}
Contributions to improve ASD2VTK are welcome! Feel free to open issues, suggest enhancements, or submit pull requests. Let's collaborate and make this tool even better.
ASD2VTK is released under the GNU Affero General Public License version 3.0 (GNU AGPLv3). Please see the LICENSE
file for more details.
This software is provided as-is and comes with no warranty.