Class Molecule3D

    • Constructor Detail

      • Molecule3D

        public Molecule3D​(Molecule3D mol)
      • Molecule3D

        public Molecule3D()
      • Molecule3D

        public Molecule3D​(int a,
                          int b)
    • Method Detail

      • getOccupiedValence

        public int getOccupiedValence​(int atom)
        Description copied from class: ExtendedMolecule
        The sum of bond orders of explicitly connected neighbour atoms including explicit hydrogen. In case of a fragment the occupied valence does not include bonds to atoms of which the cAtomQFExcludeGroup flag is set. Atom charge and radical states are not considered.
        Overrides:
        getOccupiedValence in class ExtendedMolecule
        Returns:
        explicitly used valence
      • getAttachedHydrogenCount

        public int getAttachedHydrogenCount​(int atom)
      • setAttachedHydrogenCount

        public void setAttachedHydrogenCount​(int atom,
                                             int value)
        Defines a number of attached hydrogens without known 3D-coordinates
        Parameters:
        atom -
        value - 0 to 3
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clear

        public void clear()
        Description copied from class: Molecule
        Empties the molecule to serve as container for constructing a new molecule, e.g. by multiply calling addAtom(...), addBond(...) and other high level methods.
        Overrides:
        clear in class Molecule
      • setAtomFlag

        public final void setAtomFlag​(int atm,
                                      int flag,
                                      boolean value)
      • isAtomFlag

        public final boolean isAtomFlag​(int atm,
                                        int flag)
      • getAtomFlags

        public final int getAtomFlags​(int atm)
      • setAtomFlags

        public final void setAtomFlags​(int atm,
                                       int flags)
      • setAllAtomFlag

        public final void setAllAtomFlag​(int flag,
                                         boolean value)
      • fusion

        public int fusion​(Molecule3D m2)
        This method will append a Molecule3D to the end.
        Parameters:
        m2 -
        Returns:
        the index dividing the 2 molecules
      • setBondOrder

        public void setBondOrder​(int bond,
                                 int order)
        Description copied from class: Molecule
        Sets the bond type based on bond order without stereo orientation.
        Overrides:
        setBondOrder in class Molecule
        order - 1,2, or 3
      • setAtomDescription

        public final void setAtomDescription​(int atm,
                                             java.lang.String s)
      • getAtomDescription

        public final java.lang.String getAtomDescription​(int atm)
      • setPPP

        public final void setPPP​(int atm,
                                 int[] a)
      • getPPP

        public final int[] getPPP​(int atm)
      • setAtomSequence

        public final void setAtomSequence​(int atm,
                                          int a)
      • setResSequence

        public final void setResSequence​(int atm,
                                         int a)
      • getResSequence

        public final int getResSequence​(int atm)
      • getAtomSequence

        public final int getAtomSequence​(int atm)
      • setAtomChainId

        public final void setAtomChainId​(int atm,
                                         java.lang.String a)
      • getAtomChainId

        public final java.lang.String getAtomChainId​(int atm)
      • setAtomName

        public final void setAtomName​(int atm,
                                      java.lang.String a)
      • getAtomName

        public final java.lang.String getAtomName​(int atm)
      • setAtomAmino

        public final void setAtomAmino​(int atm,
                                       java.lang.String a)
      • getAtomAmino

        public final java.lang.String getAtomAmino​(int atm)
      • getAtomBfactor

        public final double getAtomBfactor​(int atm)
      • setAtomBfactor

        public final void setAtomBfactor​(int atm,
                                         double bfactor)
      • getBond

        public final int getBond​(int a1,
                                 int a2)
        Overrides:
        getBond in class ExtendedMolecule
        Returns:
        -1 or the bond that connects atom1 with atom2
      • getCoordinates

        public final Coordinates[] getCoordinates()
      • deleteAtoms

        public final void deleteAtoms​(java.util.List<java.lang.Integer> atomsToBeDeleted)
      • getName

        public java.lang.String getName()
        Description copied from class: Molecule
        Allows to set a molecule name or identifier, that is, for instance, written to or read from molfiles.
        Overrides:
        getName in class Molecule
        Returns:
      • getShortName

        public java.lang.String getShortName()
      • getAuxiliaryInfos

        public java.util.Map<java.lang.String,​java.lang.Object> getAuxiliaryInfos()
      • getAuxiliaryInfo

        public java.lang.Object getAuxiliaryInfo​(java.lang.String name)
      • setAuxiliaryInfo

        public void setAuxiliaryInfo​(java.lang.String name,
                                     java.lang.Object value)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • setInteractionAtomType

        public final void setInteractionAtomType​(int atm,
                                                 int type)
      • getInteractionAtomType

        public final int getInteractionAtomType​(int atm)
      • setMaxAtoms

        public void setMaxAtoms​(int v)
        Description copied from class: Molecule
        Usually called automatically and hardly needed to be called.
        Overrides:
        setMaxAtoms in class Molecule
      • copyAtom

        public int copyAtom​(Molecule destMol,
                            int sourceAtom,
                            int esrGroupOffsetAND,
                            int esrGroupOffsetOR)
        Description copied from class: Molecule
        Creates a new atom in destMol and copies all source atom properties including atom list, custom label, flags, and mapNo to it.
        Overrides:
        copyAtom in class Molecule
        esrGroupOffsetAND - -1 to create new ESR group or destMol ESR group count from esrGroupCountAND()
        esrGroupOffsetOR - -1 to create new ESR group or destMol ESR group count from esrGroupCountOR()
        Returns:
        index of new atom in destMol
      • compact

        public void compact()
      • swapAtoms

        public void swapAtoms​(int atom1,
                              int atom2)
        Description copied from class: Molecule
        Swaps two atoms' indexes/locations in the atom table. This is used to move hydrogen atoms to the end of the table and for some testing purposes.
        Overrides:
        swapAtoms in class Molecule
      • addAtom

        public int addAtom​(int atomicNo)
        Add an atom with the given atomicNo
        Overrides:
        addAtom in class Molecule
        Returns:
      • addAtom

        public int addAtom​(Molecule3D m,
                           int i)
        Add an atom by copying its properties from the given Molecule3D This has to be overriden by subclasses
        Parameters:
        m -
        i -
        Returns:
      • deleteAtom

        public void deleteAtom​(int atom)
        High level function for constructing a molecule. After the deletion the original order of atom and bond indexes is retained.
        Overrides:
        deleteAtom in class Molecule
        Parameters:
        atom -
      • reorderAtoms

        public boolean reorderAtoms()
        Reorganizes atom indexes, so that moveable atoms are first
        Returns:
        the number of moveable atoms
      • setCoordinates

        public void setCoordinates​(int atom,
                                   Coordinates c)
      • getNMovables

        public int getNMovables()
        Returns:
        the number of movable atoms (after reorderatoms has been called)
      • isMoleculeInOrder

        public boolean isMoleculeInOrder()
      • getPartialCharge

        public double getPartialCharge​(int a)
      • setPartialCharge

        public void setPartialCharge​(int a,
                                     double v)
      • compareTo

        public int compareTo​(Molecule3D o)
        Specified by:
        compareTo in interface java.lang.Comparable<Molecule3D>