From 06b3209ad8d214f6380a3bd363c18082c578e3c7 Mon Sep 17 00:00:00 2001 From: julient31 Date: Mon, 25 Jun 2018 09:56:39 -0600 Subject: [PATCH] Commit JT 062518 --- examples/SPIN/read_restart/in.spin.read_data | 6 +++--- examples/SPIN/read_restart/in.spin.restart | 9 +++------ examples/SPIN/read_restart/in.spin.write_restart | 16 +++++++--------- src/SPIN/atom_vec_spin.cpp | 10 +++++----- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/examples/SPIN/read_restart/in.spin.read_data b/examples/SPIN/read_restart/in.spin.read_data index ba667e0b43..88a2dc7f0a 100644 --- a/examples/SPIN/read_restart/in.spin.read_data +++ b/examples/SPIN/read_restart/in.spin.read_data @@ -6,12 +6,12 @@ atom_style spin # necessary for the serial algorithm (sametag) atom_modify map array -read_data Norm_randXY_8x8x32.data +read_data ../examples/SPIN/read_restart/Norm_randXY_8x8x32.data mass 1 58.93 pair_style hybrid/overlay eam/alloy spin/exchange 4.0 -pair_coeff * * eam/alloy Co_PurjaPun_2012.eam.alloy Co +pair_coeff * * eam/alloy ../examples/SPIN/read_restart/Co_PurjaPun_2012.eam.alloy Co pair_coeff * * spin/exchange exchange 4.0 0.0446928 0.003496 1.4885 neighbor 1.0 bin @@ -40,6 +40,6 @@ thermo_style custom step time v_magnorm v_emag v_tmag temp etotal thermo_modify format float %20.15g compute outsp all property/atom spx spy spz sp fmx fmy fmz -dump 100 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] +dump 10 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] run 100 diff --git a/examples/SPIN/read_restart/in.spin.restart b/examples/SPIN/read_restart/in.spin.restart index f4b528fe68..f44616ca42 100644 --- a/examples/SPIN/read_restart/in.spin.restart +++ b/examples/SPIN/read_restart/in.spin.restart @@ -8,18 +8,15 @@ boundary p p p # necessary for the serial algorithm (sametag) atom_modify map array -read_restart restart_fcc_cobalt.equil - +read_restart restart_hcp_cobalt.equil # setting mass, mag. moments, and interactions mass 1 58.93 -# define magneto-mechanical potentials and forces - pair_style hybrid/overlay eam/alloy spin/exchange 4.0 -pair_coeff * * eam/alloy Co_PurjaPun_2012.eam.alloy Co -pair_coeff * * spin/exchange exchange 4.0 0.0446928 0.003496 1.4885 +pair_coeff * * eam/alloy ../examples/SPIN/read_restart/Co_PurjaPun_2012.eam.alloy Co +pair_coeff * * spin/exchange exchange 4.0 0.3593 1.135028015e-05 1.064568567 neighbor 1.0 bin neigh_modify every 1 check no delay 0 diff --git a/examples/SPIN/read_restart/in.spin.write_restart b/examples/SPIN/read_restart/in.spin.write_restart index 3acb33fbd8..84fea24611 100644 --- a/examples/SPIN/read_restart/in.spin.write_restart +++ b/examples/SPIN/read_restart/in.spin.write_restart @@ -9,7 +9,7 @@ boundary p p p # necessary for the serial algorithm (sametag) atom_modify map array -lattice fcc 3.54 +lattice hcp 2.5071 region box block 0.0 5.0 0.0 5.0 0.0 5.0 create_box 1 box create_atoms 1 box @@ -19,19 +19,17 @@ create_atoms 1 box mass 1 58.93 set group all spin/random 31 1.72 -velocity all create 100 4928459 rot yes dist gaussian -pair_style hybrid/overlay eam/alloy spin/exchange 4.0 -pair_coeff * * eam/alloy Co_PurjaPun_2012.eam.alloy Co -pair_coeff * * spin/exchange exchange 4.0 0.0446928 0.003496 1.4885 +pair_style spin/exchange 4.0 +pair_coeff * * exchange 4.0 0.3593 1.135028015e-05 1.064568567 neighbor 0.1 bin neigh_modify every 10 check yes delay 20 fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0 -fix 2 all langevin/spin 0.0 0.0 21 +fix 2 all langevin/spin 100.0 0.01 21 -fix 3 all nve/spin lattice yes +fix 3 all nve/spin lattice no timestep 0.0001 # compute and output options @@ -52,6 +50,6 @@ thermo 100 compute outsp all property/atom spx spy spz sp fmx fmy fmz dump 100 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] -run 5000 -write_restart restart_fcc_cobalt.equil +run 1000 +write_restart restart_hcp_cobalt.equil diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 20888290a0..4871fe0c40 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -44,11 +44,9 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) molecular = 0; mass_type = 1; forceclearflag = 1; - atom->sp_flag = 1; comm_x_only = 0; comm_f_only = 0; - size_forward = 7; size_reverse = 6; size_border = 10; @@ -56,6 +54,8 @@ AtomVecSpin::AtomVecSpin(LAMMPS *lmp) : AtomVec(lmp) size_data_atom = 9; size_data_vel = 4; xcol_data = 4; + + atom->sp_flag = 1; } @@ -681,7 +681,7 @@ int AtomVecSpin::size_restart() int i; int nlocal = atom->nlocal; - int n = 16 * nlocal; + int n = 15 * nlocal; if (atom->nextra_restart) for (int iextra = 0; iextra < atom->nextra_restart; iextra++) @@ -907,8 +907,8 @@ void AtomVecSpin::write_data(FILE *fp, int n, double **buf) (tagint) ubuf(buf[i][0]).i,(int) ubuf(buf[i][1]).i, buf[i][2],buf[i][3],buf[i][4], buf[i][5],buf[i][6],buf[i][7],buf[i][8], - (int) ubuf(buf[i][10]).i,(int) ubuf(buf[i][11]).i, - (int) ubuf(buf[i][12]).i); + (int) ubuf(buf[i][9]).i,(int) ubuf(buf[i][10]).i, + (int) ubuf(buf[i][11]).i); } /* ----------------------------------------------------------------------