Class JC

java.lang.Object
org.jmol.viewer.JC

public final class JC extends Object
  • Field Details

  • Constructor Details

    • JC

      public JC()
  • Method Details

    • getNBOTypeFromName

      public static int getNBOTypeFromName(String nboType)
    • getCIPChiralityName

      public static String getCIPChiralityName(int flags)
    • getCIPRuleName

      public static String getCIPRuleName(int i)
    • getCIPChiralityCode

      public static int getCIPChiralityCode(char c)
    • resolveDataBase

      static String resolveDataBase(String database, String id, String format)
    • fixProtocol

      static String fixProtocol(String name)
      Check for databases that have changed from http:// to https:// over time. We substitute https here in case this is from an old reference.
      Parameters:
      name -
      Returns:
      https protocol if necessary
    • fixOptimadeCall

      static String fixOptimadeCall(String url)
      Get all necessary response fields if an optimade call. Note that the only conditions we have here is that this is http and "optimade" is in the URL. Obviously not exactly correct.
      Parameters:
      url -
      Returns:
      call with added necessary response_fields
    • embedScript

      public static String embedScript(String s)
    • getShapeVisibilityFlag

      public static final int getShapeVisibilityFlag(int shapeID)
    • shapeTokenIndex

      public static final int shapeTokenIndex(int tok)
    • getShapeClassName

      public static final String getShapeClassName(int shapeID, boolean isRenderer)
    • getEchoName

      public static String getEchoName(int type)
    • setZPosition

      public static int setZPosition(int offset, int pos)
    • setPointer

      public static int setPointer(int offset, int pointer)
    • getPointer

      public static int getPointer(int offset)
    • getPointerName

      public static String getPointerName(int pointer)
    • isOffsetAbsolute

      public static boolean isOffsetAbsolute(int offset)
    • getOffset

      public static int getOffset(int xOffset, int yOffset, boolean isAbsolute)
      Construct an 32-bit integer packed with 10-byte x and y offsets (-500 to 500) along with flags to indicate if exact and, if not, a flag to indicate that the 0 in x or y indicates "centered". The non-exact default offset of [4,4] is represented as 0 so that new array elements do not have to be initialized.
      Parameters:
      xOffset -
      yOffset -
      isAbsolute -
      Returns:
      packed offset x and y with positioning flags
    • getXOffset

      public static int getXOffset(int offset)
      X offset in pixels. negative of this is the actual screen offset
      Parameters:
      offset - 0 for an offset indicates "not set" and delivers the default offset
      Returns:
      screen offset from left
    • getYOffset

      public static int getYOffset(int offset)
      Y offset in pixels; negative of this is the actual screen offset
      Parameters:
      offset - 0 for an offset indicates "not set" and delivers the default offset
      Returns:
      screen offset from bottom
    • getAlignment

      public static int getAlignment(int offset)
    • setHorizAlignment

      public static int setHorizAlignment(int offset, int hAlign)
    • getHorizAlignmentName

      public static String getHorizAlignmentName(int align)
    • isSmilesCanonical

      public static boolean isSmilesCanonical(String options)
    • getServiceCommand

      public static int getServiceCommand(String script)
    • getUnitIDFlags

      public static int getUnitIDFlags(String type)
      Get a unitID type
      Parameters:
      type - -mra (model name, residue, atom, and ins code), -mr (model and residue; no atom) -ra default - or -r just residue -t right-trim
      Returns:
      coded type
    • getBoolName

      public static String getBoolName(int g)