nve_md¶
-
libra_py.nve_md.
nve_md_init
(syst, mol, el, ham)[source]¶ This function initializes all the necessary variables for classical MD
Args: syst ( System object ): The object containing all the information about the chemical system.
This object is updated
mol ( Nuclear object ): The nuclear DOF. This object is updated el ( Electronic object ): The Electronic object describing which PES to use (in classical MD
it is typically the ground state)
ham ( Hamiltonian object ): The Hamiltonian object representing all the interactions
- Returns
E_kin, E_pot, E_tot:
E_kin: kinetic energy [ units: Ha ]
E_pot: potential energy [ units: Ha ]
E_tot: total energy [ units: Ha ]
This function also updates the variables of the input variable
`syst`
- Return type
(double, double, double)
Note
Operations: 1. syst -> mol 2. compute kinetic energy 3. compute forces and potential energy 4. compute total energy 5. initialize fragment variables, if any
-
libra_py.nve_md.
nve_md_step
(syst, mol, el, ham, params)[source]¶ This function performs a classical NVE MD step
- Parameters
syst (System object) – The object containing all the information about the chemical system. This object is updated
mol (Nuclear object) – The nuclear DOF. This object is updated
el (Electronic object) – The Electronic object describing which PES to use (in classical MD it is typically the ground state)
ham (Hamiltonian object) – The Hamiltonian object representing all the interactions
params (dictionary) –
The parameters controlling the execution of the dynamics
params[“dt”] ( double ): integration timestep [ units: a.u., default: 20.0 ]
params[“integrator”] ( string ): The rigid-body MD integrator [ default: “DLML” ]
- params[“fixed_fragment_translation”] ( list of ints ): the indices (starting from 0)
of the fragments whose translational DOFs are frozen [ default: empty ]
- params[“fixed_fragment_rotation”] ( list of ints ): the indices (starting from 0)
of the fragments whose rotational DOFs are frozen [ default: empty ]
- Returns
E_kin, E_pot, E_tot:
E_kin: kinetic energy [ units: Ha ]
E_pot: potential energy [ units: Ha ]
E_tot: total energy [ units: Ha ]
This function also updates the variables of the input variable
`syst`
- Return type
(double, double, double)
Note
Operations: 1. propagate rotational and translational momenta for 0.5 of dt 2. propagate rotational and translational coordinates of all fragments for dt 3. update atomic positions 4. compute potential energy and forces on atoms 5. update fragmental forces and torques 6. propagate rotational and translational momenta for another 0.5 of dt
-
libra_py.nve_md.
optimize_syst
(syst, params)[source]¶ A function to optimize the geometry of the system
- Parameters
syst (System object) – represents the chemical object
params (dictionary) –
control parameters:
- params[“anneal_schedule”] ( list ): the annealing schedule. Each element of the list
consist of 3 elements: dt, ncycles, nsteps, where: dt - the timestep for integration [ units: a.u. ] ncycles - the number of cycles of annealing with dt Each annealing cycle consists of
`nsteps`
steps of NVE MD steps followed by the cooling Cooling just resets all the momenta and angular momenta to zero Example:params[“anneal_schedule”] = [ [1.0, 100, 10], [20.0, 100, 100] ] means: First do 100 cycles of annealing: 10 MD steps with dt = 1 a.u. each followed by cooling Second do 100 cycles of annealing: 100 MD steps with dt = 20 a.u. each followed by cooling
- params[“elements_file”] ( string ): The file that contains properties of the elements
it is needed for construction of the Universe [ default: “elements.dat” ]
- params[“cooling_out1”] ( Boolean ): Whether to print out the energies along the simulated
cooling protocol. If selected, the info is printed out to the file “_en_cooling.txt” [ default: False ]
- params[“cooling_out2”] ( Boolean ): Whether to print out the coordinates in the xyz format.
If selected, the info is printed out to the “_mol_cooling.xyz” file [ default: False]
[ default: False ]
SeeAlso: is
`nve_md_step`
* params[“dt”] ( double ): integration timestep [ units: a.u., default: 20.0 ] * params[“integrator”] ( string ): The rigid-body MD integrator [ default: “DLML” ] * params[“fixed_fragment_translation”] ( list of ints ): the indices (starting from 0)of the fragments whose translational DOFs are frozen [ default: empty ]
- params[“fixed_fragment_rotation”] ( list of ints ): the indices (starting from 0)
of the fragments whose rotational DOFs are frozen [ default: empty ]