Open ufsowa opened 5 years ago
It is a lot of work to add spin in site. Need to repeat same operations like for atom. Lattice assign, set/get.
Better solution will be to keep mapping vector in potential(cvm class) which will map Atom type to spin.
Use add_atom_type(atom,name); in lattice.cpp/h to assigne sipns in the same way as names.
Add vector
In future use key map here to map name/spin to type http://www.cplusplus.com/forum/general/14982/
Added declaration of spins to lattice: https://github.com/ufsowa/mcdif/commit/867ebdc9f45a5d0760c0a080df2eb00f1e7c7e02
Add spin to site.
Assign spins to atom when building structure in site new_site(set_prec(x+X),set_prec(y+Y),set_prec(z+Z),ATOM,name,l);
Also assign spins to atoms when reading structure from file: void lattice::read_structure(string file_name,wektor start,wektor end,wektor set_st, int lattice_nr)
In site class add spin variable. Set spins for given atom type when creating lattice.