Skip to content

Commit 17e6adf

Browse files
CopilotOutisLi
andcommitted
fix(test): update LAMMPS spin test expected values for PT model
Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
1 parent fbd7f03 commit 17e6adf

2 files changed

Lines changed: 52 additions & 88 deletions

File tree

source/lmp/tests/test_lammps_spin_nopbc_pt.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@
3232
md_file = Path(__file__).parent / "md.out"
3333

3434
expected_ae = np.array(
35-
[-5.452114789070532, -5.480146653237549, -5.196470063744647, -5.196470063744647]
35+
[-2.337313880002, -2.339828637443377, -2.358478126000974, -2.358478126000974]
3636
)
3737
expected_e = np.sum(expected_ae)
3838
expected_f = np.array(
3939
[
40-
[0.1005891161568464, -0.0421386837954357, -0.1035159238420185],
41-
[-0.1005891161568464, 0.0421386837954357, 0.1035159238420185],
42-
[-0.0874023630887424, -0.0816522076223778, 0.1196032337003844],
43-
[0.0874023630887424, 0.0816522076223778, -0.1196032337003844],
40+
[0.036908169450058, -0.0154615304452946, -0.0277072310206975],
41+
[-0.036908169450058, 0.0154615304452946, 0.0277072310206975],
42+
[-0.001114392839443, -0.0010410775210586, 0.0015249586223957],
43+
[0.001114392839443, 0.0010410775210586, -0.0015249586223957],
4444
]
4545
)
4646
expected_fm = np.array(
4747
[
48-
[0.0248296941890119, -0.0104016286467482, 0.0166496777995534],
49-
[-0.0407454346265244, 0.0170690334246251, 0.0337262181162752],
48+
[0.0075469514215227, -0.0031615607306379, 0.0204654183352036],
49+
[-0.0074172317569893, 0.003107218709009, 0.020927678503653],
5050
[0.0000000000000000, 0.00000000000000000, 0.00000000000000000],
5151
[0.0000000000000000, 0.00000000000000000, 0.00000000000000000],
5252
]

source/lmp/tests/test_lammps_spin_pt.py

Lines changed: 45 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@
3333
md_file = Path(__file__).parent / "md.out"
3434

3535
expected_ae = np.array(
36-
[-5.449480235829702, -5.477427268428831, -5.123857693399778, -5.177090216511519]
36+
[-2.33730603846356, -2.339828637443377, -2.3584765990764933, -2.358478126000974]
3737
)
3838
expected_e = np.sum(expected_ae)
3939
expected_f = np.array(
4040
[
41-
[0.0009801138704236, -0.0463347604851765, -0.0971306357815108],
42-
[-0.1470821855808306, 0.0437825717490265, 0.1068452488480858],
43-
[0.0227539242796509, -0.0733473535079378, 0.1021096625763913],
44-
[0.123348147430756, 0.0758995422440877, -0.1118242756429664],
41+
[0.036819000183374, -0.0154603124989284, -0.0277136918031471],
42+
[-0.0369115932121166, 0.0154614940830129, 0.0277067438704936],
43+
[-0.0010240778189108, -0.0010425850123752, 0.0015323196618039],
44+
[0.0011166708476534, 0.0010414034282908, -0.0015253717291505],
4545
]
4646
)
4747
expected_fm = np.array(
4848
[
49-
[0.0072488655758703, -0.0111496506342658, 0.018024837587741],
50-
[-0.0469100751121456, 0.0170834549641258, 0.0338904617477562],
49+
[0.007540380021158, -0.0031615447712641, 0.0204706018052022],
50+
[-0.0074177167392878, 0.0031072528813168, 0.0209277147341756],
5151
[0.0000000000000000, 0.00000000000000000, 0.00000000000000000],
5252
[0.0000000000000000, 0.00000000000000000, 0.00000000000000000],
5353
]
@@ -73,62 +73,44 @@
7373

7474
expected_v = -np.array(
7575
[
76-
0.0070639867264982,
77-
-0.0005923577001662,
78-
-0.0015491268442953,
79-
-0.0005741900039506,
80-
0.0004072991754844,
81-
0.0005919446476345,
82-
-0.0013659665914274,
83-
0.0005245686552392,
84-
0.0011288634277803,
85-
0.0074611996305919,
86-
-0.0015158254500315,
87-
-0.0030704181444311,
88-
-0.0015503527871207,
89-
0.0006417155838534,
90-
0.0010901024672963,
91-
-0.0032762727340245,
92-
0.0011481000769186,
93-
0.0022122852076016,
94-
-0.0049637269273085,
95-
-0.0033079530214069,
96-
0.0048850199723435,
97-
-0.0032277537906931,
98-
-0.0030526361938397,
99-
0.0044721003136312,
100-
0.0053457625015160,
101-
0.0044600355962439,
102-
-0.0065441506206723,
103-
-0.0044231868209291,
104-
-0.0033953486551904,
105-
0.0050014995082810,
106-
-0.0035584060948890,
107-
-0.0032308004485022,
108-
0.0047399657455500,
109-
0.0056902937417672,
110-
0.0047696802946761,
111-
-0.0070004831270587,
112-
0.0034978220789713,
113-
-0.0044217265408896,
114-
-0.0075771507215158,
115-
-0.0043265981217727,
116-
0.0016344211766637,
117-
0.0031438764476946,
118-
-0.0069613658908443,
119-
0.0032277030414985,
120-
0.0055466693735168,
121-
-0.0182670501038624,
122-
-0.0030197903610554,
123-
0.0012333318415169,
124-
-0.0030157009303137,
125-
0.0006787737562374,
126-
0.0017594542103399,
127-
0.0025814653441594,
128-
0.0020137939338955,
129-
0.0014966802677115,
76+
0.0138536891649799,
77+
-0.0057815832940349,
78+
-0.0104366273910430,
79+
-0.0057802135977019,
80+
0.0024216972469495,
81+
0.0043747666241247,
82+
-0.0120159787305366,
83+
0.0050342035124280,
84+
0.0090942101965059,
85+
0.0135151396517160,
86+
-0.0056617476919350,
87+
-0.0102276732499471,
88+
-0.0056606594176084,
89+
0.0023713573235927,
90+
0.0042837422619739,
91+
-0.0084858208754591,
92+
0.0035548709072868,
93+
0.0064217022841311,
94+
0.0007099617850315,
95+
0.0003917168967788,
96+
-0.0005467867622337,
97+
0.0003906286224523,
98+
0.0003696501943719,
99+
-0.0005419287758774,
100+
-0.0005551067425154,
101+
-0.0005416915274450,
102+
0.0007957607021995,
103+
0.0004252005652282,
104+
0.0003972268438316,
105+
-0.0005818534050492,
106+
0.0003958571474987,
107+
0.0003698139141107,
108+
-0.0005416992544720,
109+
-0.0005797982376440,
110+
-0.0005416536167464,
111+
0.0007934081146707,
130112
]
131-
).reshape(6, 9)
113+
).reshape(4, 9)
132114

133115
expected_v2 = -np.array(
134116
[
@@ -168,26 +150,8 @@
168150
0.0010319090966831,
169151
0.0009955172109546,
170152
-0.0014553634659113,
171-
0.0027303678059308,
172-
-0.0017755948961346,
173-
-0.0030761923779883,
174-
-0.0017183308924552,
175-
0.0006816964863724,
176-
0.0012957090028794,
177-
-0.0042486220709583,
178-
0.0018539755349361,
179-
0.0032531905210736,
180-
-0.0053263906035893,
181-
-0.0013059666848022,
182-
-0.0000753225555805,
183-
-0.0013078437276500,
184-
0.0003423965327707,
185-
0.0008080454760442,
186-
0.0003139988733780,
187-
0.0008955147923178,
188-
0.0008788489971600,
189153
]
190-
).reshape(6, 9)
154+
).reshape(4, 9)
191155

192156
box = np.array([0, 13, 0, 13, 0, 13, 0, 0, 0])
193157
coord = np.array(

0 commit comments

Comments
 (0)