/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.36
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


using System;
using System.Runtime.InteropServices;

public class OBFFConstraints : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal OBFFConstraints(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

  internal static HandleRef getCPtr(OBFFConstraints obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~OBFFConstraints() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
        swigCMemOwn = false;
        openbabelPINVOKE.delete_OBFFConstraints(swigCPtr);
      }
      swigCPtr = new HandleRef(null, IntPtr.Zero);
      GC.SuppressFinalize(this);
    }
  }

  public OBFFConstraints() : this(openbabelPINVOKE.new_OBFFConstraints(), true) {
  }

  public void Clear() {
    openbabelPINVOKE.OBFFConstraints_Clear(swigCPtr);
  }

  public double GetConstraintEnergy() {
    double ret = openbabelPINVOKE.OBFFConstraints_GetConstraintEnergy(swigCPtr);
    return ret;
  }

  public vector3 GetGradient(int a) {
    vector3 ret = new vector3(openbabelPINVOKE.OBFFConstraints_GetGradient(swigCPtr, a), true);
    return ret;
  }

  public void Setup(OBMol mol) {
    openbabelPINVOKE.OBFFConstraints_Setup(swigCPtr, OBMol.getCPtr(mol));
    if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetFactor(double factor) {
    openbabelPINVOKE.OBFFConstraints_SetFactor(swigCPtr, factor);
  }

  public void AddIgnore(int a) {
    openbabelPINVOKE.OBFFConstraints_AddIgnore(swigCPtr, a);
  }

  public void AddAtomConstraint(int a) {
    openbabelPINVOKE.OBFFConstraints_AddAtomConstraint(swigCPtr, a);
  }

  public void AddAtomXConstraint(int a) {
    openbabelPINVOKE.OBFFConstraints_AddAtomXConstraint(swigCPtr, a);
  }

  public void AddAtomYConstraint(int a) {
    openbabelPINVOKE.OBFFConstraints_AddAtomYConstraint(swigCPtr, a);
  }

  public void AddAtomZConstraint(int a) {
    openbabelPINVOKE.OBFFConstraints_AddAtomZConstraint(swigCPtr, a);
  }

  public void AddDistanceConstraint(int a, int b, double length) {
    openbabelPINVOKE.OBFFConstraints_AddDistanceConstraint(swigCPtr, a, b, length);
  }

  public void AddAngleConstraint(int a, int b, int c, double angle) {
    openbabelPINVOKE.OBFFConstraints_AddAngleConstraint(swigCPtr, a, b, c, angle);
  }

  public void AddTorsionConstraint(int a, int b, int c, int d, double torsion) {
    openbabelPINVOKE.OBFFConstraints_AddTorsionConstraint(swigCPtr, a, b, c, d, torsion);
  }

  public void DeleteConstraint(int index) {
    openbabelPINVOKE.OBFFConstraints_DeleteConstraint(swigCPtr, index);
  }

  public double GetFactor() {
    double ret = openbabelPINVOKE.OBFFConstraints_GetFactor(swigCPtr);
    return ret;
  }

  public int Size() {
    int ret = openbabelPINVOKE.OBFFConstraints_Size(swigCPtr);
    return ret;
  }

  public int GetConstraintType(int index) {
    int ret = openbabelPINVOKE.OBFFConstraints_GetConstraintType(swigCPtr, index);
    return ret;
  }

  public double GetConstraintValue(int index) {
    double ret = openbabelPINVOKE.OBFFConstraints_GetConstraintValue(swigCPtr, index);
    return ret;
  }

  public int GetConstraintAtomA(int index) {
    int ret = openbabelPINVOKE.OBFFConstraints_GetConstraintAtomA(swigCPtr, index);
    return ret;
  }

  public int GetConstraintAtomB(int index) {
    int ret = openbabelPINVOKE.OBFFConstraints_GetConstraintAtomB(swigCPtr, index);
    return ret;
  }

  public int GetConstraintAtomC(int index) {
    int ret = openbabelPINVOKE.OBFFConstraints_GetConstraintAtomC(swigCPtr, index);
    return ret;
  }

  public int GetConstraintAtomD(int index) {
    int ret = openbabelPINVOKE.OBFFConstraints_GetConstraintAtomD(swigCPtr, index);
    return ret;
  }

  public bool IsIgnored(int a) {
    bool ret = openbabelPINVOKE.OBFFConstraints_IsIgnored(swigCPtr, a);
    return ret;
  }

  public bool IsFixed(int a) {
    bool ret = openbabelPINVOKE.OBFFConstraints_IsFixed(swigCPtr, a);
    return ret;
  }

  public bool IsXFixed(int a) {
    bool ret = openbabelPINVOKE.OBFFConstraints_IsXFixed(swigCPtr, a);
    return ret;
  }

  public bool IsYFixed(int a) {
    bool ret = openbabelPINVOKE.OBFFConstraints_IsYFixed(swigCPtr, a);
    return ret;
  }

  public bool IsZFixed(int a) {
    bool ret = openbabelPINVOKE.OBFFConstraints_IsZFixed(swigCPtr, a);
    return ret;
  }

  public OBBitVec GetIgnoredBitVec() {
    OBBitVec ret = new OBBitVec(openbabelPINVOKE.OBFFConstraints_GetIgnoredBitVec(swigCPtr), true);
    return ret;
  }

}
