Class BioExt


  • public class BioExt
    extends Object
    • Constructor Detail

      • BioExt

        public BioExt()
    • Method Detail

      • getAllPolymerInfo

        void getAllPolymerInfo​(javajs.util.BS bs,
                               Map<String,​javajs.util.Lst<Map<String,​Object>>> fullInfo)
      • calculateStraightnessAll

        void calculateStraightnessAll()
      • getPdbData

        private void getPdbData​(BioPolymer bp,
                                char ctype,
                                char qtype,
                                int mStep,
                                int derivType,
                                javajs.util.BS bsAtoms,
                                javajs.util.BS bsSelected,
                                boolean bothEnds,
                                boolean isDraw,
                                boolean addHeader,
                                LabelToken[] tokens,
                                javajs.util.OC pdbATOM,
                                javajs.util.SB pdbCONECT,
                                javajs.util.BS bsWritten,
                                javajs.util.P3 ptTemp)
      • getData

        private void getData​(int m0,
                             int mStep,
                             BioPolymer p,
                             char ctype,
                             char qtype,
                             int derivType,
                             javajs.util.BS bsAtoms,
                             javajs.util.BS bsSelected,
                             boolean isDraw,
                             boolean isRamachandran,
                             boolean calcRamachandranStraightness,
                             boolean useQuaternionStraightness,
                             boolean writeRamachandranStraightness,
                             boolean quaternionStraightness,
                             float factor,
                             boolean isAmino,
                             boolean isRelativeAlias,
                             LabelToken[] tokens,
                             javajs.util.OC pdbATOM,
                             javajs.util.SB pdbCONECT,
                             javajs.util.BS bsWritten,
                             javajs.util.P3 ptTemp)
        Parameters:
        m0 -
        mStep -
        p -
        ctype -
        qtype -
        derivType -
        bsAtoms -
        bsSelected -
        isDraw -
        isRamachandran -
        calcRamachandranStraightness -
        useQuaternionStraightness -
        writeRamachandranStraightness -
        quaternionStraightness - NOT USED
        factor -
        isAmino -
        isRelativeAlias -
        tokens -
        pdbATOM -
        pdbCONECT -
        bsWritten -
        ptTemp -
      • getQInfo

        private static String getQInfo​(javajs.util.Quat q)
      • drawQuat

        static String drawQuat​(javajs.util.Quat q,
                               String prefix,
                               String id,
                               javajs.util.P3 ptCenter,
                               float scale)
      • get3DStraightness

        private static float get3DStraightness​(String id,
                                               javajs.util.Quat dq,
                                               javajs.util.Quat dqnext)
        Parameters:
        id - for debugging only
        dq -
        dqnext -
        Returns:
        calculated straightness
      • getQuaternionStraightness

        private static float getQuaternionStraightness​(String id,
                                                       javajs.util.Quat dq,
                                                       javajs.util.Quat dqnext)
        Parameters:
        id - for debugging only
        dq -
        dqnext -
        Returns:
        straightness
      • getStraightness

        private static float getStraightness​(float cosHalfTheta)
      • getPdbDataM

        void getPdbDataM​(BioModel m,
                         Viewer vwr,
                         String type,
                         char ctype,
                         boolean isDraw,
                         javajs.util.BS bsSelected,
                         javajs.util.OC out,
                         LabelToken[] tokens,
                         javajs.util.SB pdbCONECT,
                         javajs.util.BS bsWritten)
      • calculateAllstruts

        int calculateAllstruts​(Viewer vwr,
                               ModelSet ms,
                               javajs.util.BS bs1,
                               javajs.util.BS bs2)
      • calculateStruts

        private static javajs.util.Lst<Atom[]> calculateStruts​(ModelSet modelSet,
                                                               javajs.util.BS bs1,
                                                               javajs.util.BS bs2,
                                                               javajs.util.Lst<Atom> vCA,
                                                               float thresh,
                                                               int delta,
                                                               boolean allowMultiple)
        Algorithm of George Phillips phillips@biochem.wisc.edu originally a contribution to pyMol as struts.py; adapted here by Bob Hanson for Jmol 1/2010 Return a vector of support posts for rapid prototyping models along the lines of George Phillips for Pymol except on actual molecular segments (biopolymers), not PDB chains (which may or may not be continuous). Like George, we go from thresh-4 to thresh in units of 1 Angstrom, but we do not require this threshold to be an integer. In addition, we prevent double-creation of struts by tracking where struts are, and we do not look for any addtional end struts if there is a strut already to an atom at a particular biopolymer end. The three parameters are: set strutDefaultRadius 0.3 set strutSpacingMinimum 6 set strutLengthMaximum 7.0 Struts will be introduced by: calculate struts {atom set A} {atom set B} where the two atom sets are optional and default to the currently selected set. They can be manipulated using the STRUTS command much like any "bond" struts 0.3 color struts opaque pink connect {atomno=3} {atomno=4} strut struts only command
        Parameters:
        modelSet -
        bs1 -
        bs2 -
        vCA -
        thresh -
        delta -
        allowMultiple -
        Returns:
        vector of pairs of atoms
      • strutPoint

        private static int strutPoint​(int i,
                                      int j,
                                      int n)
      • setStrut

        private static void setStrut​(int i,
                                     int j,
                                     int n,
                                     javajs.util.Lst<Atom> vCA,
                                     javajs.util.BS bs1,
                                     javajs.util.BS bs2,
                                     javajs.util.Lst<Atom[]> vStruts,
                                     javajs.util.BS bsStruts,
                                     javajs.util.BS bsNotAvailable,
                                     javajs.util.BS bsNearbyResidues,
                                     int delta)
      • mutate

        boolean mutate​(Viewer vwr,
                       javajs.util.BS bs,
                       String group,
                       String[] sequence)
      • mutateAtom

        private static boolean mutateAtom​(Viewer vwr,
                                          int iatom,
                                          String fileName)
      • getMutationBackbone

        private static Atom[] getMutationBackbone​(AminoMonomer res1,
                                                  Atom[] backbone)
        Parameters:
        res1 -
        backbone -
        Returns:
        [C O CA N H]
      • getAminoAcidValenceAndCharge

        boolean getAminoAcidValenceAndCharge​(String res,
                                             String name,
                                             int[] ret)
        returns an array if we have special hybridization or charge
        Parameters:
        res -
        name -
        ret - [0] (target valence) may be reduced by one for sp2 for C or O only [1] will be set to 1 if positive (lysine or terminal N) or -1 if negative (OXT) [2] will be set to 2 if sp2 [3] is supplied covalent bond count
        Returns:
        true for special; false if not