Package org.jmol.util

Class Edge

java.lang.Object
org.jmol.util.Edge
All Implemented Interfaces:
SimpleEdge
Direct Known Subclasses:
Bond, SmilesBond

public abstract class Edge extends Object implements SimpleEdge
  • Field Details

  • Constructor Details

    • Edge

      public Edge()
  • Method Details

    • getAtomIndex1

      public abstract int getAtomIndex1()
    • getAtomIndex2

      public abstract int getAtomIndex2()
    • getCovalentOrder

      public abstract int getCovalentOrder()
      Specified by:
      getCovalentOrder in interface SimpleEdge
      Returns:
      the bond order 1-4 if it is covalent, or 0 if not.
    • isCovalent

      public abstract boolean isCovalent()
      Specified by:
      isCovalent in interface SimpleEdge
    • isPartial

      public abstract boolean isPartial()
    • isHydrogen

      public abstract boolean isHydrogen()
    • getArgbHbondType

      public static int getArgbHbondType(int order)
    • getBondOrderNumberFromOrder

      public static final String getBondOrderNumberFromOrder(int order)
      used for formatting labels and in the connect PARTIAL command
      Parameters:
      order -
      Returns:
      a string representation to preserve float n.m
    • getCmlBondOrder

      public static final String getCmlBondOrder(int order)
    • getBondOrderNameFromOrder

      public static final String getBondOrderNameFromOrder(int order)
    • getAtropismOrder

      public static int getAtropismOrder(int nn, int mm)
    • getAtropismOrder12

      public static int getAtropismOrder12(int nnmm)
    • getAtropismNode

      public static Node getAtropismNode(int order, Node a1, boolean isFirst)
    • isAtropism

      public static boolean isAtropism(int order)
    • isOrderH

      public static boolean isOrderH(int order)
    • getPartialBondDotted

      public static final int getPartialBondDotted(int order)
    • getPartialBondOrder

      public static final int getPartialBondOrder(int order)
    • getCovalentBondOrder

      protected static final int getCovalentBondOrder(int order)
    • getBondOrderFromFloat

      public static final int getBondOrderFromFloat(float fOrder)
    • getBondOrderFromString

      public static int getBondOrderFromString(String s)
      Encode name such as 1 2 3 2.1 3.1 single double triple atropisomer_12 or "partial 1.3"
      Parameters:
      s -
      Returns:
      encoded form of bond
    • getPartialBondOrderFromFloatEncodedInt

      public static int getPartialBondOrderFromFloatEncodedInt(int bondOrderInteger)
      reads standard n.m double-as-integer (n*1000000 + m) and returns partial bond order as (n % 7) invalid input: '<'invalid input: '<' 5 + (m % 0x1F)
      Parameters:
      bondOrderInteger -
      Returns:
      partial bond order encoded as an integer
    • getFloatEncodedInt

      public static int getFloatEncodedInt(String strDecimal)
      Encodes a string such as "2.10" as an integer instead of a double so as to distinguish "2.1" from "2.10". For n.m, returns n * 1000000 + m. 2147483647 is maxvalue, so this allows an encoding of up to n = 2147 and m = 999999 Used in Jmol for model numbers and partial bond orders.
      Parameters:
      strDecimal -
      Returns:
      double encoded as an integer
    • getBondType

      public int getBondType()
      Description copied from interface: SimpleEdge
      Get the order of the bond. This could be covalent order, but also could be NEAR, FAR, etc.
      Specified by:
      getBondType in interface SimpleEdge
      Returns:
      order
    • setCIPChirality

      public void setCIPChirality(int c)
      Parameters:
      c -
    • getCIPChirality

      public String getCIPChirality(boolean doCalculate)
      Parameters:
      doCalculate -
      Returns:
      CIP chirality label