[lammps-users] magnetic system

Hello,
I need to learn how to simulate a magnetic system. How can I find some scripts as examples?

Hello Runak!

My name is Julien Tranchida, I’m the lead developer of the SPIN package that enables magneto-elastic simulations with Lammps. Thanks a lot for your interest!

You can find some initial scripts in the example repository of Lammps (lammps/examples/SPIN). Note that those are just a set of toy models, so that you should not blindly use them to perform actual materials simulations. You will always have to adapt them to your own materials and simulations.
That being said, they should provide you with a lot of information. For example, how to set the type of your particles to be atomic spins (so having a position, a velocity, and a magnetic spin), how to initialize spin configurations, how to combine a Heisenberg Hamiltonian with any mechanical potential implemented in Lammps, how to run spin - lattice dynamics (or spin dynamics on a frozen lattice), output magnetic quantities, and countless other things.

You can also relate all this information to some of the manuscripts we’ve been publishing with the code through the years, for example:
https://www.sciencedirect.com/science/article/pii/S0021999118304200
https://aip.scitation.org/doi/abs/10.1063/5.0055606

https://iopscience.iop.org/article/10.1088/1361-648X/ab8b9c/meta

https://journals.aps.org/prb/abstract/10.1103/PhysRevB.103.094437

https://www.nature.com/articles/s41524-021-00617-2

In all those manuscripts, you should find information about the definition of magneto-elastic potentials, initial spin-lattice configurations, or spin-lattice calculations in NVE, NVT, or semi-NPT ensembles. Overall, it should be straightforward to compare the setups in those papers to the examples in the examples/SPIN repository.

Of course, you can (and should!) also read the documentation. I tried to keep it up-to-date. For any magnetic command that you will find in the examples, you should be able to find an associated doc page. For example:
https://docs.lammps.org/Howto_spins.html

https://docs.lammps.org/pair_spin_exchange.html

https://docs.lammps.org/fix_nve_spin.html
If you’re not sure about the meaning of one of the commands in the example deck, have a look at the associated doc page should always give you an answer ;-).

Hope this helps! Let me know if you have specific questions about some setups.

All the best,
Julien.

That’s great. Thanks a lot Julien for your help.