# SIMULATION CELL cell = [[0., 20.], [0., 20.]] # DYNAMICS PARAMETERS dt = 5. steps = 1E3 # SET INITIAL VALUES rs = [[5., 5], [15., 3.5], [2.5, 8.]] vs = [[0.01, 0.], [0., 0.], [0.001, -0.002]] masses = [1860.] * 3 n_beads = 8 # POTENTIAL f = qmp.potential.presets.Elbow(2, elbow_scale=0.005) pot = qmp.potential.Potential(cell, f=f()) integrator = qmp.integrator.RPMD_VelocityVerlet(dt) system = qmp.systems.RPMD(rs, vs, masses, n_beads, init_type='velocity', T=20) # INITIALIZE MODEL rpmd2d = qmp.Model(mode='rpmd', integrator=integrator, system=system, potential=pot) print(rpmd2d) # EVOLVE SYSTEM rpmd2d.run(steps, output_freq=1)
# free = qmp.potential.presets.Free(1) pot = qmp.potential.Potential(cell, f=wall()) # Choose an integrator: integrator = qmp.integrator.SOFT_Propagator(dt) # integrator = qmp.integrator.PrimitivePropagator(dt) # Prepare initial wavefunction: sigma = 1. / 2. psi_0 = qmp.tools.create_gaussian(*system.mesh, x0=-8., p0=2., sigma=sigma) psi_0 /= np.sqrt(np.conjugate(psi_0).dot(psi_0)) system.set_initial_wvfn(psi_0) # Create the model: wave_model_1D = qmp.Model(system=system, potential=pot, integrator=integrator, mode='wave', states=N) # Print model information: print(wave_model_1D) print('Grid points:', N, '\n') # Run the simulation: wave_model_1D.run(steps, output_freq=output_freq) print() print('Results:') print('Reflect N=1', 'Transmit N=1') print(wave_model_1D.data.outcome)
# pot = qmp.potential.tullymodels.TullyExtendedCoupling(cell=cell) # Choose integrator: integrator = qmp.integrator.SOFT_Propagator(dt) # integrator = qmp.integrator.PrimitivePropagator(dt) # Create and set the initial wavefunction: x = -6 p = 30 sigma = 20 / p psi_0 = qmp.tools.create_gaussian(system.mesh[0], x0=x, p0=p, sigma=sigma) psi_0 /= np.sqrt(np.conjugate(psi_0).dot(psi_0)) system.set_initial_wvfn(psi_0) # Create the model: wave_model = qmp.Model(system=system, potential=pot, integrator=integrator, mode='wave') # Print model information: print(wave_model) print('Grid points:', N, '\n') # Run the simulation: wave_model.run(steps, output_freq=8) # Print the scattering results: print('Reflection', 'Transmission') print(wave_model.data.outcome)
# SIMULATION CELL cell = [[0., 20.], [0., 20.]] rs = [[15., 4.5], [15., 3.5], [2.5, 8.]] vs = [[-.001, -0.00001], [0., 0.], [1., -2.]] masses = [1., 1., 1.] dt = 0.05 # POTENTIAL elbow = qmp.potential.presets.Elbow(2) pot = qmp.potential.Potential(cell, f=elbow()) integ = qmp.integrator.VelocityVerlet(dt) sys = qmp.systems.PhaseSpace(rs, vs, masses) # INITIALIZE MODEL traj2d = qmp.Model( system=sys, potential=pot, integrator=integ, mode='traj', ) print(traj2d) # DYNAMICS PARAMETERS steps = 3000 # EVOLVE SYSTEM traj2d.run(steps)
v = np.array([0]) initial_state = 1 n_beads = 16 T = 1 / 16 * qmp.tools.dyn_tools.atomic_to_kelvin # Choose potential: potential = qmp.potential.spin_boson.SpinBoson(cell=cell, gamma=0.1) # Choose integrator: integrator = qmp.integrator.MF_RPMD_Propagator(dt=dt) system = qmp.systems.MF_RPMD(x, v, mass, start_file='nvt.traj', equilibration_end=100, n_beads=n_beads, T=T) # Create the model: wave_model = qmp.Model(system=system, potential=potential, integrator=integrator, mode='nrpmd') # Run the simulation: wave_model.run(steps, output_freq=1) wave_model.write_output()
N = 512 cell = np.array([[-10, 10]]) mass = 1 system = qmp.systems.Grid(mass, cell, N) # POTENTIAL f = qmp.potential.presets.Harmonic(1) pot = qmp.potential.Potential(cell, f=f()) # INITIALIZE MODEL # number of lowest eigenstates to be solved for states = 30 wave_model = qmp.Model( potential=pot, system=system, mode='wave', states=states, ) print(wave_model) wave_model.solve() psi = wave_model.system.basis x = wave_model.system.mesh[0] # VISUALIZATION wave_slideshow1D(x, psi, wave_model.potential(x))
# SIMULATION CELL N = 512 cell = np.array([[-10, 10], [-10., 10.]]) mass = 1 system = qmp.systems.Grid(mass, cell, N) # POTENTIAL f = qmp.potential.presets.Harmonic(2) pot = qmp.potential.Potential(cell, f=f()) # INITIALIZE MODEL # number of lowest eigenstates to be solved for states = 20 tik2d = qmp.Model( mode='wave', system=system, potential=pot, states=states, ) print(tik2d) tik2d.solve() psi = tik2d.system.basis V_xy = tik2d.potential(*tik2d.system.mesh) # VISUALIZATION wave_slideshow2D(*tik2d.system.mesh, psi, pot=V_xy)