/* ----------------------------------------------------------------------------
 * 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 OBFFConstraint : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

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

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

  ~OBFFConstraint() {
    Dispose();
  }

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

  public double factor {
    set {
      openbabelPINVOKE.OBFFConstraint_factor_set(swigCPtr, value);
    } 
    get {
      double ret = openbabelPINVOKE.OBFFConstraint_factor_get(swigCPtr);
      return ret;
    } 
  }

  public double constraint_value {
    set {
      openbabelPINVOKE.OBFFConstraint_constraint_value_set(swigCPtr, value);
    } 
    get {
      double ret = openbabelPINVOKE.OBFFConstraint_constraint_value_get(swigCPtr);
      return ret;
    } 
  }

  public double rab0 {
    set {
      openbabelPINVOKE.OBFFConstraint_rab0_set(swigCPtr, value);
    } 
    get {
      double ret = openbabelPINVOKE.OBFFConstraint_rab0_get(swigCPtr);
      return ret;
    } 
  }

  public double rbc0 {
    set {
      openbabelPINVOKE.OBFFConstraint_rbc0_set(swigCPtr, value);
    } 
    get {
      double ret = openbabelPINVOKE.OBFFConstraint_rbc0_get(swigCPtr);
      return ret;
    } 
  }

  public int type {
    set {
      openbabelPINVOKE.OBFFConstraint_type_set(swigCPtr, value);
    } 
    get {
      int ret = openbabelPINVOKE.OBFFConstraint_type_get(swigCPtr);
      return ret;
    } 
  }

  public int ia {
    set {
      openbabelPINVOKE.OBFFConstraint_ia_set(swigCPtr, value);
    } 
    get {
      int ret = openbabelPINVOKE.OBFFConstraint_ia_get(swigCPtr);
      return ret;
    } 
  }

  public int ib {
    set {
      openbabelPINVOKE.OBFFConstraint_ib_set(swigCPtr, value);
    } 
    get {
      int ret = openbabelPINVOKE.OBFFConstraint_ib_get(swigCPtr);
      return ret;
    } 
  }

  public int ic {
    set {
      openbabelPINVOKE.OBFFConstraint_ic_set(swigCPtr, value);
    } 
    get {
      int ret = openbabelPINVOKE.OBFFConstraint_ic_get(swigCPtr);
      return ret;
    } 
  }

  public int id {
    set {
      openbabelPINVOKE.OBFFConstraint_id_set(swigCPtr, value);
    } 
    get {
      int ret = openbabelPINVOKE.OBFFConstraint_id_get(swigCPtr);
      return ret;
    } 
  }

  public OBAtom a {
    set {
      openbabelPINVOKE.OBFFConstraint_a_set(swigCPtr, OBAtom.getCPtr(value));
    } 
    get {
      IntPtr cPtr = openbabelPINVOKE.OBFFConstraint_a_get(swigCPtr);
      OBAtom ret = (cPtr == IntPtr.Zero) ? null : new OBAtom(cPtr, false);
      return ret;
    } 
  }

  public OBAtom b {
    set {
      openbabelPINVOKE.OBFFConstraint_b_set(swigCPtr, OBAtom.getCPtr(value));
    } 
    get {
      IntPtr cPtr = openbabelPINVOKE.OBFFConstraint_b_get(swigCPtr);
      OBAtom ret = (cPtr == IntPtr.Zero) ? null : new OBAtom(cPtr, false);
      return ret;
    } 
  }

  public OBAtom c {
    set {
      openbabelPINVOKE.OBFFConstraint_c_set(swigCPtr, OBAtom.getCPtr(value));
    } 
    get {
      IntPtr cPtr = openbabelPINVOKE.OBFFConstraint_c_get(swigCPtr);
      OBAtom ret = (cPtr == IntPtr.Zero) ? null : new OBAtom(cPtr, false);
      return ret;
    } 
  }

  public OBAtom d {
    set {
      openbabelPINVOKE.OBFFConstraint_d_set(swigCPtr, OBAtom.getCPtr(value));
    } 
    get {
      IntPtr cPtr = openbabelPINVOKE.OBFFConstraint_d_get(swigCPtr);
      OBAtom ret = (cPtr == IntPtr.Zero) ? null : new OBAtom(cPtr, false);
      return ret;
    } 
  }

  public vector3 grada {
    set {
      openbabelPINVOKE.OBFFConstraint_grada_set(swigCPtr, vector3.getCPtr(value));
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      vector3 ret = new vector3(openbabelPINVOKE.OBFFConstraint_grada_get(swigCPtr), false);
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public vector3 gradb {
    set {
      openbabelPINVOKE.OBFFConstraint_gradb_set(swigCPtr, vector3.getCPtr(value));
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      vector3 ret = new vector3(openbabelPINVOKE.OBFFConstraint_gradb_get(swigCPtr), false);
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public vector3 gradc {
    set {
      openbabelPINVOKE.OBFFConstraint_gradc_set(swigCPtr, vector3.getCPtr(value));
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      vector3 ret = new vector3(openbabelPINVOKE.OBFFConstraint_gradc_get(swigCPtr), false);
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public vector3 gradd {
    set {
      openbabelPINVOKE.OBFFConstraint_gradd_set(swigCPtr, vector3.getCPtr(value));
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      vector3 ret = new vector3(openbabelPINVOKE.OBFFConstraint_gradd_get(swigCPtr), false);
      if (openbabelPINVOKE.SWIGPendingException.Pending) throw openbabelPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public OBFFConstraint() : this(openbabelPINVOKE.new_OBFFConstraint(), true) {
  }

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

}
