Class JC


  • public final class JC
    extends java.lang.Object
    • Constructor Detail

      • JC

        public JC()
    • Method Detail

      • getNBOTypeFromName

        public static int getNBOTypeFromName​(java.lang.String nboType)
      • getCIPChiralityName

        public static java.lang.String getCIPChiralityName​(int flags)
      • getCIPRuleName

        public static java.lang.String getCIPRuleName​(int i)
      • getCIPChiralityCode

        public static int getCIPChiralityCode​(char c)
      • resolveDataBase

        static java.lang.String resolveDataBase​(java.lang.String database,
                                                java.lang.String id,
                                                java.lang.String format)
      • fixProtocol

        static java.lang.String fixProtocol​(java.lang.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
      • embedScript

        public static java.lang.String embedScript​(java.lang.String s)
      • getShapeVisibilityFlag

        public static final int getShapeVisibilityFlag​(int shapeID)
      • shapeTokenIndex

        public static final int shapeTokenIndex​(int tok)
      • getShapeClassName

        public static final java.lang.String getShapeClassName​(int shapeID,
                                                               boolean isRenderer)
      • getEchoName

        public static java.lang.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 java.lang.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 java.lang.String getHorizAlignmentName​(int align)
      • isSmilesCanonical

        public static boolean isSmilesCanonical​(java.lang.String options)
      • getServiceCommand

        public static int getServiceCommand​(java.lang.String script)
      • getUnitIDFlags

        public static int getUnitIDFlags​(java.lang.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