def make_constraints(ff, constraints):
    """Adds specified constraints to given ForceField object, returns that
    object."""
    cm = {'a': ff.MMFFAddAngleConstraint, 'p': ff.MMFFAddPositionConstraint,
        'd': ff.MMFFAddDistanceConstraint, 't': ff.MMFFAddTorsionConstraint}
    for kind, *params in constraints:
        cm[kind](*params)
    return ff
