Commit cc2b5fbb authored by julient31's avatar julient31
Browse files

Commit JT 031119

- add min_post_force in precession
parent 5fff1893
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
# bcc iron in a 3d periodic box
print "Test 1"

units 		metal
dimension 	3
+2 −28
Original line number Diff line number Diff line
@@ -13,8 +13,6 @@ region box block 0.0 68.0 0.0 68.0 0.0 1.0
create_box 	1 box
create_atoms 	1 box

#read_data        ../examples/SPIN/gneb_bfo/initial.iron_spin

# setting mass, mag. moments, and interactions for bcc iron

mass		1 1.0
@@ -34,20 +32,8 @@ neigh_modify every 10 check yes delay 20
fix 		1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
fix 		2 all langevin/spin 0.1 0.0 21
fix		3 all nve/spin lattice no 
#fix		3 all neb/spin 1.0 
#fix		4 all nve/spin lattice no 
#parallel ideal

timestep	0.0001
#thermo		10

#compute 	outsp all property/atom spx spy spz sp fmx fmy fmz
#dump 		1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]

#min_style	spinmin
#minimize        1.0e-6 1.0e-6 1000 10000
#minimize        1.0e-6 1.0e-6 10000 10000
#minimize        1.0e-7 1.0e-7 10000 10000

compute 	out_mag    all spin
compute 	out_pe     all pe
@@ -66,18 +52,6 @@ thermo_modify format float %20.15g
compute 	outsp all property/atom spx spy spz sp fmx fmy fmz
dump 		200 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7]

#timestep	0.0001
#run 		1
min_style	spinmin
#minimize        1.0e-6 1.0e-6 1000 10000
#minimize        1.0e-6 1.0e-6 10000 10000
minimize        1.0e-8 1.0e-8 10000 1000

#write_dump all custom dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] 

#compute outsp all property/atom spx spy spz sp fmx fmy fmz
#dump 1 all custom 1 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
#thermo		1

#neb/spin		0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin
#neb/spin		0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin
minimize        1.0e-6 1.0e-6 10000 10000
#minimize        1.0e-8 1.0e-8 10000 1000
+2 −19
Original line number Diff line number Diff line
@@ -13,8 +13,6 @@ region box block 0.0 4.0 0.0 4.0 0.0 1.0
create_box 	1 box
create_atoms 	1 box

#read_data        ../examples/SPIN/gneb_bfo/initial.iron_spin

# setting mass, mag. moments, and interactions for bcc iron

mass		1 55.845
@@ -31,16 +29,9 @@ neigh_modify every 10 check yes delay 20
fix 		1 all precession/spin anisotropy 0.001 0.0 0.0 1.0
fix 		2 all langevin/spin 0.1 0.0 21
fix		3 all nve/spin lattice no 
#fix		3 all neb/spin 1.0 
#fix		4 all nve/spin lattice no 
#parallel ideal

timestep	0.0001

#min_style	spinmin
#minimize        1.0e-6 1.0e-6 1000 10000
#minimize        1.0e-8 1.0e-6 1000 10000

compute 	out_mag    all spin
compute 	out_pe     all pe
compute 	out_ke     all ke
@@ -58,14 +49,6 @@ thermo_modify format float %20.15g
compute 	outsp all property/atom spx spy spz sp fmx fmy fmz
dump 		1 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7]

#timestep	0.0001
#run 		1

min_style	spinmin
#minimize        1.0e-6 1.0e-6 1000 10000
minimize        1.0e-8 1.0e-6 1000 10000



#neb/spin		0.0 0.1 10 10 10 final ../examples/SPIN/gneb_bfo/final.iron_spin
#neb/spin		0.0 0.1 1000 1000 100 final ../examples/SPIN/gneb_bfo/final.iron_spin
minimize        1.0e-6 1.0e-6 1000 10000
#minimize        1.0e-8 1.0e-6 1000 10000
+8 −0
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ int FixPrecessionSpin::setmask()
{
  int mask = 0;
  mask |= POST_FORCE;
  mask |= MIN_POST_FORCE;
  mask |= THERMO_ENERGY;
  mask |= POST_FORCE_RESPA;
  return mask;
@@ -283,3 +284,10 @@ double FixPrecessionSpin::compute_scalar()
  }
  return emag_all;
}

/* ---------------------------------------------------------------------- */

void FixPrecessionSpin::min_post_force(int vflag)
{
  post_force(vflag);
}
+3 −2
Original line number Diff line number Diff line
@@ -33,8 +33,9 @@ class FixPrecessionSpin : public Fix {
  int setmask();
  void init();
  void setup(int);
  virtual void post_force(int);
  virtual void post_force_respa(int, int, int);
  void post_force(int);
  void post_force_respa(int, int, int);
  void min_post_force(int);
  double compute_scalar();

  int zeeman_flag, aniso_flag;
Loading