Skip to content

Commit

Permalink
update qeq, matrix invertion method and projected gradient method wer…
Browse files Browse the repository at this point in the history
…â�e added, units of some paramters were unified
  • Loading branch information
gust-07 committed Sep 5, 2024
1 parent dcc9fa5 commit cdb4ac6
Showing 1 changed file with 38 additions and 9 deletions.
47 changes: 38 additions & 9 deletions docs/user_guide/4.3ADMPQeqForce.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ To create a ADMP QEQ potential function, one needs to do the following in python
hamilt = Hamiltonian('forcefield.xml')
pot = hamilt.createPotential(dmfftop, nonbondedCutoff=rc*unit.nanometer, nonbondedMethod=app.PME,
ethresh=1e-3, neutral=True, slab=True, constQ=True,
const_list=const_list, const_vals=const_val,
const_list=const_list, const_vals=const_val, part_const=True
has_aux=True
)
```
Expand All @@ -206,6 +206,7 @@ A few keywords in `createPotential` would impact the behavior of the function:
* `const_vals`: the corresponding constraint valu on each residue.

* `ethresh`: the accuracy of PME, used to setup the size of the meshgrid of PME.
* `part_const`: bool type, whether there are constraint groups or not.
* `has_aux`: bool type, whether to intruduce auxilliary parameters, equilibrated atomic charges, etc.

## 3. ADMPQeqGenerator Doc
Expand Down Expand Up @@ -252,6 +253,9 @@ The backend of the ADMP QEQ energy is an `ADMPQeqForce` object. It contains the
* `e_sr`: short range damping energy function
* `e_site`: on site energy function
* `coul_energy`: point charge interaction energy function
* `icount`: times to run get_energy function
* `hessinv_stride`: strides to update charges by matrix inversion method
* `qupdate_stride`: strides to update charges

***METHOS***

Expand All @@ -278,8 +282,6 @@ The backend of the ADMP QEQ energy is an `ADMPQeqForce` object. It contains the
Np: interacting pair indices within cutoff distance
eta:
N: the atomic length damping parameter
ds:
Np: topology distance of pairs
buffer_scales:
N * 3: buffer scales on pairs
mscales:
Expand All @@ -288,14 +290,14 @@ The backend of the ADMP QEQ energy is an `ADMPQeqForce` object. It contains the
energy: charge related coulombic energy plus constraint energy
```

* `E_grads`:

Same as `E_full`, only return the concatenation of gradients of funtion `E_ful` on the first two paramters.

* `get_energy`:
* `E_hession`:
```
Same as `E_full`, only return hession matrix of `E_full`.
```

* `get_int_energy`:
```
This contains charge equilbrant process, and retruns total energy after charge equilibration.
This contains charge equilbrant process by matrix inversion method, and retruns total energy after charge equilibration.
Input:
positions:
Expand All @@ -318,3 +320,30 @@ The backend of the ADMP QEQ energy is an `ADMPQeqForce` object. It contains the
energy: total energy after charge equilibration
aux: auxilliary parameters, including equilibrated atomic charges and lagmt
```

* `get_proj_grad`:
```
Function to get the value and projected gradients.
Input:
func:
function: position
constriant_matrix:
N * Na: N constrained groups
has_aux:
bool type: whether to return auxiliaries.
```

* `get_step_energy`:
```
This contains charge equilbrant process by matrix inversion method or projected gradient method, it depends on step count and `hessinv_stride`, and retruns total energy after charge equilibration.
The inputs are the as `E_full`.
```

* `get_energy`:
```
This contains charge equilbrant process and total energy calculation, retruns total energy every step and update charges by every strides of `qupdate_stride`.
The inputs are the as `E_full`.
```

0 comments on commit cdb4ac6

Please sign in to comment.