RDCode: DistGeom::DistViolationContrib Class Reference

# DistGeom::DistViolationContrib Class Reference

`#include <DistViolationContrib.h>`

Inheritance diagram for DistGeom::DistViolationContrib:

List of all members.

## Public Member Functions
| DistViolationContrib ()
| DistViolationContrib (ForceFields::ForceField *owner, unsigned int idx1, unsigned int idx2, double ub, double lb, double weight=1.0)
| Constructor.
double | getEnergy (double *pos) const
| returns our contribution to the energy of a position
void | getGrad (double *pos, double *grad) const
| calculates our contribution to the gradients of a position

## Detailed Description

A term to capture the violation of the upper and lower bounds by distance between two points

Definition at line 14 of file DistViolationContrib.h.

## Constructor & Destructor Documentation

DistGeom::DistViolationContrib::DistViolationContrib | ( |  | ) | `[inline]`

Definition at line 16 of file DistViolationContrib.h.

DistGeom::DistViolationContrib::DistViolationContrib | ( | ForceFields::ForceField * | owner,
|  | unsigned int | idx1,
|  | unsigned int | idx2,
|  | double | ub,
|  | double | lb,
|  | double | weight = `1.0` |
| ) |  |  |

Constructor.

Parameters:

  | owner | pointer to the owning ForceField
  | idx1 | index of end1 in the ForceField's positions
  | idx2 | index of end2 in the ForceField's positions
  | ub | Upper bound on the distance
  | lb | Lower bound on the distance
  | weight | optional weight for this contribution

## Member Function Documentation

double DistGeom::DistViolationContrib::getEnergy | ( | double * | pos | ) | const`[virtual]`

returns our contribution to the energy of a position

Implements ForceFields::ForceFieldContrib.

void DistGeom::DistViolationContrib::getGrad | ( | double * | pos,
|  | double * | grad |
| ) |  |  | const`[virtual]`

calculates our contribution to the gradients of a position

Implements ForceFields::ForceFieldContrib.

The documentation for this class was generated from the following file:

- DistViolationContrib.h