Example #1
0
// addBonds
void AmberParm::addBond(Bond& new_bond) {
    int i = new_bond.getAtomI();
    int j = new_bond.getAtomJ();
    int natom = (int)atoms_.size();
    if (i < 0 || i >= natom || j < 0 || j >= natom)
        throw AmberParmError("Bond atom index out of range");
    bonds_.push_back(new_bond);
}