diff --git a/classical/test_cheb_ho_2p_1d.py b/classical/test_cheb_ho_2p_1d.py index 435a47b7414c3ee3bc99054d32d67b0c2bf5d230..95e8625f540d065b3260d53345b42e4a2be72a39 100644 --- a/classical/test_cheb_ho_2p_1d.py +++ b/classical/test_cheb_ho_2p_1d.py @@ -2,7 +2,7 @@ from chebyshev import Chebyshev from symplectic import Symplectic from systems import Harmonic, MPPS1D -from mpliouville import MPLPQP +from mpliouville import MPLPDV import matplotlib.pyplot as plt import sympy as sp import numpy as np @@ -11,13 +11,15 @@ M = np.full(2, 2.0) r0 = 3.5 kappa = sp.Rational(1, 2) syspar = {'symbols': ['0', '1'], 'q0': [[0], [1]], 'p0': [[1], [0]], - 'masses': M} + 'masses': M, 'numeric': {'tool': 'theano'}} ffpar = [{'class': 'FFHarmonic', 'pair': ((0,), (1,)), 'params': {'distance': r0, 'kappa': kappa}}] syst = MPPS1D(ffpar, **syspar) -params = {'tstart': 0.0, 'tend': 4.0, 'tstep': 0.05, 'nterms': 4, 'liouville': MPLPQP} +params = {'tstart': 0.0, 'tend': 4.0, 'tstep': 0.001, 'nterms': 4, 'liouville': MPLPDV} prop = Chebyshev(syst=syst, **params) +prop.dump() +exit() prop.propagate() prop.analyse() (ti, qt, pt) = prop.get_trajectory() diff --git a/classical/test_cheb_lj_2p_3d.py b/classical/test_cheb_lj_2p_3d.py index b57f6efbf514de19e35a17dc58e3933837ebc9db..06b814ab1313dd1bb62f7e97dd9770a915a440a7 100644 --- a/classical/test_cheb_lj_2p_3d.py +++ b/classical/test_cheb_lj_2p_3d.py @@ -2,7 +2,7 @@ from chebyshev import Chebyshev from symplectic import Symplectic from systems import ManyAtomsSystem -from mpliouville import MPLPVQ +from mpliouville import MPLPNR import matplotlib.pyplot as plt import numpy as np from ase import Atoms @@ -22,13 +22,13 @@ atoms_aux.set_positions(momenta) atoms.euler_rotate(phi=45, theta=30, psi=10) atoms_aux.euler_rotate(phi=45, theta=30, psi=10) atoms.set_momenta(atoms_aux.get_positions()) -# numeric = {'tool': 'lambdify', 'modules': ['math', 'numpy']} -numeric = {'tool': 'theano'} +numeric = {'tool': 'lambdify', 'modules': 'tensorflow'} +# numeric = {'tool': 'theano'} # numeric = {'tool': 'subs'} syst = ManyAtomsSystem(atoms, 'FFLennardJones', numeric=numeric) -params = {'tstart': 0.0, 'tend': 14.0, 'tstep': 0.005, 'nterms': 4, - 'liouville': MPLPVQ, 'tqdm': True} +params = {'tstart': 0.0, 'tend': 10.0, 'tstep': 0.001, 'nterms': 4, + 'liouville': MPLPNR, 'tqdm': True} prop = Chebyshev(syst=syst, **params) print('propagation begins') prop.propagate() diff --git a/classical/test_cheb_lj_2p_3d_pbc.py b/classical/test_cheb_lj_2p_3d_pbc.py index 0d15044673e4736754c77782b8309fb0149f29f3..97d7bbc9e652a5cabceab84a5bbdb5bd04317fd4 100644 --- a/classical/test_cheb_lj_2p_3d_pbc.py +++ b/classical/test_cheb_lj_2p_3d_pbc.py @@ -15,14 +15,17 @@ cell = np.array([15, 15, 15])*argon_u.sigmaA positions = np.array([[1, 0, 0], [3, 0, 0]])*argon_u.sigmaA momenta = np.array([[0, 0, 0], [-1, 0, 0]])*argon_u.momentumA atoms = Atoms(symbols, cell=cell, pbc=pbc, positions=positions, momenta=momenta) -numeric = {'tool': 'subs'} -# numeric = {'tool': 'theano'} +# numeric = {'tool': 'subs'} +numeric = {'tool': 'theano'} # numeric = {'tool': 'lambdify', 'modules': ['math', 'numpy']} syst = ManyAtomsSystem(atoms, 'FFLennardJones', numeric=numeric) params = {'tstart': 0.0, 'tend': 14.0, 'tstep': 0.005, 'nterms': 4, 'liouville': MPLPDV, 'tqdm': True, 'pbc': True} -prop = Chebyshev(syst=syst, **params) +prop = Chebyshev(syst=syst, restart=True, restart_file='restart.pkl', **params) +# prop = Chebyshev(syst=syst, **params) +# prop.dump('restart.pkl') +# exit() print('propagation begins') prop.propagate() # prop.analyse() diff --git a/classical/test_iln_2p_3d_dv.py b/classical/test_iln_2p_3d_dv.py index 167b165cf45c018ddb12e72c8a50dcbc8702c443..ef3b3aa4c17528c075182fca4107fa3cd0e6db9d 100644 --- a/classical/test_iln_2p_3d_dv.py +++ b/classical/test_iln_2p_3d_dv.py @@ -10,9 +10,9 @@ nterms = 3 ffparams = [{'class': 'FFLennardJones', 'pair': ((0, 1, 2), (3, 4, 5))}] symbols = ['0x:z', '1x:z'] -masses = np.array([1, 1, 1, 1, 1, 1]) -qval = np.array([1, 2, 3, 1, 1, 1]) -pval = np.array([0, 0, 0, 1, 1, 1]) +masses = np.array([1, 1]) +qval = np.array([[1, 2, 3], [1, 1, 1]]) +pval = np.array([[0, 0, 0], [1, 1, 1]]) pbc = np.array((True, True, True)) cell = np.array((2, 2, 2)) # numeric={'tool': 'theano'}