oqp.library.libscipy
OQP single point class
Classes
Functions
|
Module Contents
- class Optimizer(mol)
OQP optimization class user should use the subclass to define the one_step optimization function see TemplateOpt class for example
- mol
- optimizer
- step_size
- step_tol
- maxit
- mep_maxit
- rmsd_grad
- rmsd_step
- max_grad
- max_step
- istate
- jstate
- kstate
- imult
- jmult
- energy_shift
- energy_gap
- init_scf
- nstate
- natom
- atoms
- sp
- grad
- ls
- itr = 0
- pre_energy = 0
- pre_coord
- metrics
- optimize()
- one_step(coordinates)
- opt_func(coordinates)
- check_convergence()
- class ConstrainOpt(mol)
Bases:
OptimizerOQP Constrained optimization class
- mol
- ref_coord
- mass
- tmass
- init_energy = 0
- last_energy = 0
- init_xyz = None
- last_xyz = None
- last_radius = 0
- opt_status = 0
- message = 'not converged'
- one_step(coordinates)
- check_convergence()
- class MECIOpt(mol)
Bases:
OptimizerOQP MECI optimization class upb or penalty method
- meci_search
- sigma
- alpha
- incre
- weights
- x
- y
- method
- work_func
- one_step(coordinates)
- hybrid(coordinates, energies, grads)
first use penalty method switch to ubp when gap is < self.energy_gap
- ubp(coordinates, energies, grads)
update branching plane method for state i and j, j = i + 1 in the first step x_0 = [G(j) - G(i)] / np.sum([G(j) - G(i)] ** 2) ** 2 y_0 = G(i) - np.sum(G(i) * x_0) * x_0 y_0 = y_0 / np.sum(y_0 ** 2), so x_0 and y_0 are orthonormal in the k-th step y_k = [(x_k-1 * x_k) * y_k-1 - (y_k-1 * x_k) * x_k-1] / [(y_k-1 * x_k) ** 2 + (x_k-1 * x_k) ** 2] ** 0.5 note the sign of x_k-1 and y_k-1 are opposite to the paper F = [E(j) + E(i)] * 0.5 + [E(j) - E(i)] ** 2 / sigma dF = PE * 0.5 + 2 * [E(j) - E(i)] / sigma * [G(j) - G(i)] PE = G(j) + G(i) - np.sum([G(j) + G(i)] * x_k) * x_k - np.sum([G(j) + G(i)] * y_k) * y_k in the original paper sigma = np.sum([G(j) - G(i)] ** 2) ** 0.5 in this implementation we set sigma = np.sum([G(j) - G(i)] ** 2) reference: J. Chem. Theory Comput.2010,6,1538–1545
- penalty(coordinates, energies, grads)
penalty method for state i and j, j = i + 1 F = [E(j) + E(i)] * 0.5 + sigma * P P = [E(j) - E(i)] ** 2 / [E(j) - E(i) + alpha] dF = [G(j) + G(i)] * 0.5 + sigma * dP dP = {[E(j) - E(i)] ** 2 + 2 * alpha * [E(j) - E(i)]} / [E(j) - E(i) + alpha] ** 2 * [G(j) - G(i)] in the original paper sigma is a growing factor, 3.5 alpha is a constant factor, 0.02 in this implementation we set a constant sigma to 1 we replace alpha with np.mean([G(j) - G(i)] ** 2) ** 0.5 reference: J. Phys. Chem. B 2008,112,405-413
- check_convergence()
- class MECPOpt(mol)
Bases:
OptimizerOQP MECP optimization class quadratic method
- mecp_search = 'quad'
- weights
- method
- work_func
- one_step(coordinates)
- quad(coordinates, energies, grads)
quadratic penalty optimization F = 0.5 * (E1 + E2) + w * (E2 - E1) ** 2 dF = 0.5 * (G1 + G2) + 2 * w * (E2 - E1) * (G2 - G1)
- check_convergence()
- class StateSpecificOpt(mol)
Bases:
OptimizerOQP state specific optimization class
- method
- one_step(coordinates)
- class MEP(mol)
OQP minimum energy path calculation class
- mol
- istate
- mep_maxit
- atoms
- mo = None
- mep_itr = 0
- mep_energies = []
- optimizer
- optimize()
- check_mep()
- ReLU(x, y)