You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lmp.command("variable dU1 equal c_c1/atoms") # Driving-force obtained from NEHI procedure.
227
237
lmp.command("variable dU2 equal c_c2/atoms")
228
238
239
+
#add swaps if n_swap is > 0
240
+
ifself.calc.monte_carlo.n_swaps>0:
241
+
self.logger.info(f'{self.calc.monte_carlo.n_swaps} swap moves are performed between {self.calc.monte_carlo.swap_types[0]} and {self.calc.monte_carlo.swap_types[1]} every {self.calc.monte_carlo.n_steps}')
242
+
lmp.command("fix swap all atom/swap %d %d %d %f ke no types %d %d"%(self.calc.monte_carlo.n_steps,
243
+
self.calc.monte_carlo.n_swaps,
244
+
np.random.randint(1, 10000),
245
+
self.calc._temperature,
246
+
self.calc.monte_carlo.swap_types[0],
247
+
self.calc.monte_carlo.swap_types[1]))
248
+
lmp.command("variable a equal f_swap[1]")
249
+
lmp.command("variable b equal f_swap[2]")
250
+
lmp.command("fix swap2 all print 1 \"${a} ${b} ${flambda}\" screen no file swap.forward_%d.dat"%iteration)
lmp.command("variable dU1 equal c_c1/atoms") # Driving-force obtained from NEHI procedure.
279
309
lmp.command("variable dU2 equal c_c2/atoms")
280
310
311
+
#add swaps if n_swap is > 0
312
+
ifself.calc.monte_carlo.n_swaps>0:
313
+
ifself.calc.monte_carlo.reverse_swap:
314
+
self.logger.info(f'{self.calc.monte_carlo.n_swaps} swap moves are performed between {self.calc.monte_carlo.swap_types[1]} and {self.calc.monte_carlo.swap_types[0]} every {self.calc.monte_carlo.n_steps}')
315
+
lmp.command("fix swap all atom/swap %d %d %d %f ke no types %d %d"%(self.calc.monte_carlo.n_steps,
316
+
self.calc.monte_carlo.n_swaps,
317
+
np.random.randint(1, 10000),
318
+
self.calc._temperature,
319
+
self.calc.monte_carlo.swap_types[1],
320
+
self.calc.monte_carlo.swap_types[0]))
321
+
else:
322
+
self.logger.info(f'{self.calc.monte_carlo.n_swaps} swap moves are performed between {self.calc.monte_carlo.swap_types[0]} and {self.calc.monte_carlo.swap_types[1]} every {self.calc.monte_carlo.n_steps}')
323
+
self.logger.info('note that swaps are not reversed')
324
+
lmp.command("fix swap all atom/swap %d %d %d %f ke no types %d %d"%(self.calc.monte_carlo.n_steps,
325
+
self.calc.monte_carlo.n_swaps,
326
+
np.random.randint(1, 10000),
327
+
self.calc._temperature,
328
+
self.calc.monte_carlo.swap_types[0],
329
+
self.calc.monte_carlo.swap_types[1]))
330
+
331
+
lmp.command("variable a equal f_swap[1]")
332
+
lmp.command("variable b equal f_swap[2]")
333
+
lmp.command("fix swap2 all print 1 \"${a} ${b} ${blambda}\" screen no file swap.backward_%d.dat"%iteration)
0 commit comments