Class MathExt


  • public class MathExt
    extends java.lang.Object
    • Constructor Detail

      • MathExt

        public MathExt()
    • Method Detail

      • init

        public MathExt init​(java.lang.Object se)
      • evaluateDotDist

        private boolean evaluateDotDist​(ScriptMathProcessor mp,
                                        SV[] args,
                                        int tok,
                                        int op)
                                 throws ScriptException
        x = y.distance({atoms}) the average distance from elements of y to the CENTER of {atoms} x = {atomset1}.distance.min({atomset2}, asAtomSet) If asAtomSet is true, returns the closest atom in atomset1 to any atom of atomset2; if false or omitted, returns an array listing the distance of each atom in atomset1 to the closest atom in atomset2. This array can be used to assign properties to atomset1: {1.1}.property_d = {1.1}.distance.min({2.1}); color {1.1} property_d. x = {atomset1}.distance.min({point}, asAtomSet) If asAtomSet is true, returns the atom in atomset1 closest to the specified point;if false or omitted, returns the closest distance to the specified point from any atom in atomset1. x = {atomset1}.distance.min({atomset2}).min returns the shortest distance from any atom in atomset1 to any atom in atomset2. x = {atomset1}.distance.max({atomset2}, asAtomSet) If asAtomSet is true, returns the furthest atom in atomset1 to any atom of atomset2; if false or omitted, returns an array listing the distance of each atom in atomset1 to the furthest atom in atomset2. x = {atomset1}.distance.max({point}, asAtomSet) If asAtomSet is true, returns the atom in atomset1 furthest from the specified point;if false or omitted, returns the furthest distance to the specified point from any atom in atomset1. x = {atomset1}.distance.max({atomset2}).max returns the furthest distance from any atom in atomset1 to any atom in atomset2. x = {atomset1}.distance.all({atomset2}) returns an array or array of arrays of values
        Parameters:
        mp -
        args -
        tok -
        op - optional .min .max for distance
        Returns:
        true if successful
        Throws:
        ScriptException
      • getHelixData

        private java.lang.Object getHelixData​(BS bs,
                                              int tokType)
      • evaluateGetProperty

        private boolean evaluateGetProperty​(ScriptMathProcessor mp,
                                            SV[] args,
                                            int tok0,
                                            boolean isAtomProperty)
                                     throws ScriptException
        _ by itself, not as a function, is shorthand for getProperty("auxiliaryInfo") $ print _.keys boundbox group3Counts group3Lists modelLoadNote models properties someModelsHaveFractionalCoordinates someModelsHaveSymmetry someModelsHaveUnitcells symmetryRange _m by itself, not as a function, is shorthand for getProperty("auxiliaryInfo.models")[_currentFrame] $ print format("json",_m.unitCellParams) [ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,-2.1660376,-2.1660376,0.0,-2.1660376, 2.1660376,-4.10273,0.0,0.0,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN ] {atomset}._ by itself delivers a subset array of auxiliaryInfo.models for all models in {atomset} $ print {*}._..1..aflowInfo (first model's aflowInfo) _(key) prepends "auxiliaryInfo.models", delivering a modelCount-length array of information $ print _("aflowInfo[SELECT auid WHERE H__eV___VASP_ < 0]") {atomset}._(key) selects for model Auxiliary info related to models of the specified atoms {atomset}.getProperty(key) defaults to atomInfo, but also allows key to start with "bondInfo" Examples: print _("aflowInfo[select sg where volume_cell > 70]") print {model>10}._("aflowInfo[select sg where volume_cell > 70]")
        Parameters:
        mp -
        args -
        tok0 -
        isAtomProperty -
        Returns:
        true if no syntax problems
        Throws:
        ScriptException
      • getSublist

        private javajs.util.Lst<SV> getSublist​(javajs.util.Lst<SV> listIn,
                                               javajs.util.Lst<SV> formatList)
        [ {...},{...}... ] ==> [[...],[...]]
        Parameters:
        listIn -
        formatList -
        Returns:
        sublist
      • addAllLists

        private javajs.util.Lst<SV> addAllLists​(javajs.util.Lst<SV> list,
                                                javajs.util.Lst<SV> l)
      • getAtomsNearSurface

        private BS getAtomsNearSurface​(float distance,
                                       java.lang.String surfaceId)
      • getAtomsNearPts

        private BS getAtomsNearPts​(float distance,
                                   javajs.util.T3[] points,
                                   BS bsInclude)
      • getMinMax

        public java.lang.Object getMinMax​(java.lang.Object floatOrSVArray,
                                          int tok)
      • getMinMaxPoint

        private java.lang.Object getMinMaxPoint​(java.lang.Object pointOrSVArray,
                                                int tok)
        calculates the statistical value for x, y, and z independently
        Parameters:
        pointOrSVArray -
        tok -
        Returns:
        Point3f or "NaN"
      • getMinMaxQuaternion

        private java.lang.Object getMinMaxQuaternion​(javajs.util.Lst<SV> svData,
                                                     int tok)
      • opTokenFor

        private T opTokenFor​(int tok)
      • setContactBitSets

        public BS setContactBitSets​(BS bsA,
                                    BS bsB,
                                    boolean localOnly,
                                    float distance,
                                    RadiusData rd,
                                    boolean warnMultiModel)