Package com.actelion.research.chem
Class Molecule3D
- java.lang.Object
-
- com.actelion.research.chem.Molecule
-
- com.actelion.research.chem.ExtendedMolecule
-
- com.actelion.research.chem.StereoMolecule
-
- com.actelion.research.chem.Molecule3D
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Molecule3D>
public class Molecule3D extends StereoMolecule implements java.lang.Comparable<Molecule3D>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intATTACHED_HYDROGEN_COUNTstatic intATTACHED_HYDROGEN_COUNT_SHIFTstatic intBACKBONEstatic intFLAG1static intIMPORTANTstatic intINFO_AMINOstatic intINFO_ATOMNAMEstatic intINFO_ATOMSEQUENCEstatic intINFO_BFACTORstatic intINFO_CHAINIDstatic intINFO_DESCRIPTIONstatic intINFO_INTERACTION_ATOM_TYPEstatic intINFO_PPPstatic intINFO_RESSEQUENCEstatic intLIGANDstatic intPREOPTIMIZEDstatic intRIGID-
Fields inherited from class com.actelion.research.chem.StereoMolecule
VALIDATION_ERROR_AMBIGUOUS_CONFIGURATION, VALIDATION_ERROR_ESR_CENTER_UNKNOWN, VALIDATION_ERROR_OVER_UNDER_SPECIFIED, VALIDATION_ERRORS_STEREO
-
Fields inherited from class com.actelion.research.chem.ExtendedMolecule
cMaxConnAtoms, FISCHER_PROJECTION_LIMIT, STEREO_ANGLE_LIMIT
-
Fields inherited from class com.actelion.research.chem.Molecule
cAtomCIPParityNone, cAtomCIPParityProblem, cAtomCIPParityRorM, cAtomCIPParitySorP, cAtomColorBlue, cAtomColorDarkGreen, cAtomColorDarkRed, cAtomColorGreen, cAtomColorMagenta, cAtomColorNone, cAtomColorOrange, cAtomColorRed, cAtomFlagAllylic, cAtomFlagAromatic, cAtomFlagConfigurationUnknown, cAtomFlagMarked, cAtomFlags2RingBonds, cAtomFlags3RingBonds, cAtomFlags4RingBonds, cAtomFlagsESR, cAtomFlagsHelper, cAtomFlagsHelper2, cAtomFlagsHelper3, cAtomFlagSmallRing, cAtomFlagsParity, cAtomFlagsRingBonds, cAtomFlagStabilized, cAtomFlagStereoProblem, cAtomFlagsValence, cAtomLabel, cAtomParity1, cAtomParity2, cAtomParityIsPseudo, cAtomParityNone, cAtomParityUnknown, cAtomQFAny, cAtomQFAromatic, cAtomQFAromState, cAtomQFAromStateBits, cAtomQFAromStateShift, cAtomQFCharge, cAtomQFChargeBits, cAtomQFChargeShift, cAtomQFExcludeGroup, cAtomQFFlatNitrogen, cAtomQFHydrogen, cAtomQFHydrogenBits, cAtomQFHydrogenShift, cAtomQFMatchStereo, cAtomQFMoreNeighbours, cAtomQFNarrowing, cAtomQFNeighbourBits, cAtomQFNeighbours, cAtomQFNeighbourShift, cAtomQFNoMoreNeighbours, cAtomQFNoOfBits, cAtomQFNot0Hydrogen, cAtomQFNot0Neighbours, cAtomQFNot0PiElectrons, cAtomQFNot1Hydrogen, cAtomQFNot1Neighbour, cAtomQFNot1PiElectron, cAtomQFNot2Hydrogen, cAtomQFNot2Neighbours, cAtomQFNot2PiElectrons, cAtomQFNot2RingBonds, cAtomQFNot3Hydrogen, cAtomQFNot3Neighbours, cAtomQFNot3RingBonds, cAtomQFNot4Neighbours, cAtomQFNot4RingBonds, cAtomQFNotAromatic, cAtomQFNotChain, cAtomQFNotCharge0, cAtomQFNotChargeNeg, cAtomQFNotChargePos, cAtomQFPiElectronBits, cAtomQFPiElectrons, cAtomQFPiElectronShift, cAtomQFRingSize, cAtomQFRingSizeBits, cAtomQFRingSizeShift, cAtomQFRingState, cAtomQFRingStateBits, cAtomQFRingStateShift, cAtomQFRxnParityBits, cAtomQFRxnParityHint, cAtomQFRxnParityInvert, cAtomQFRxnParityRacemize, cAtomQFRxnParityRetain, cAtomQFRxnParityShift, cAtomQFSimpleFeatures, cAtomRadicalState, cAtomRadicalStateD, cAtomRadicalStateNone, cAtomRadicalStateS, cAtomRadicalStateShift, cAtomRadicalStateT, cAtomValence, cBondCIPParityEorP, cBondCIPParityNone, cBondCIPParityProblem, cBondCIPParityZorM, cBondFlagAromatic, cBondFlagDelocalized, cBondFlagRing, cBondFlagsCIPParityShift, cBondFlagsESR, cBondFlagsHelper2, cBondFlagsHelper3, cBondFlagSmallRing, cBondFlagsParity, cBondParityEor1, cBondParityNone, cBondParityUnknown, cBondParityZor2, cBondQFAllFeatures, cBondQFAromatic, cBondQFAromState, cBondQFAromStateBits, cBondQFAromStateShift, cBondQFBondTypes, cBondQFBondTypesBits, cBondQFBondTypesShift, cBondQFBridge, cBondQFBridgeBits, cBondQFBridgeMin, cBondQFBridgeMinBits, cBondQFBridgeMinShift, cBondQFBridgeShift, cBondQFBridgeSpan, cBondQFBridgeSpanBits, cBondQFBridgeSpanShift, cBondQFDelocalized, cBondQFDouble, cBondQFMatchStereo, cBondQFMetalLigand, cBondQFNarrowing, cBondQFNoOfBits, cBondQFNotAromatic, cBondQFNotRing, cBondQFRing, cBondQFRingSize, cBondQFRingSizeBits, cBondQFRingSizeShift, cBondQFRingState, cBondQFRingStateBits, cBondQFRingStateShift, cBondQFSimpleFeatures, cBondQFSingle, cBondQFTriple, cBondTypeCross, cBondTypeDeleted, cBondTypeDelocalized, cBondTypeDouble, cBondTypeDown, cBondTypeIncreaseOrder, cBondTypeMaskSimple, cBondTypeMaskStereo, cBondTypeMetalLigand, cBondTypeSingle, cBondTypeTriple, cBondTypeUp, cChiralityDiastereomers, cChiralityEpimers, cChiralityIsomerCountMask, cChiralityKnownEnantiomer, cChiralityMeso, cChiralityNotChiral, cChiralityRacemic, cChiralityUnknown, cChiralityUnknownEnantiomer, cCommonOxidationState, cDefaultAtomValence, cESRGroupBits, cESRMaxGroups, cESRTypeAbs, cESRTypeAnd, cESRTypeOr, cHelperBitCIP, cHelperBitIncludeNitrogenParities, cHelperBitNeighbours, cHelperBitParities, cHelperBitRings, cHelperBitRingsSimple, cHelperBitsStereo, cHelperBitSymmetryDiastereotopic, cHelperBitSymmetryEnantiotopic, cHelperBitSymmetrySimple, cHelperCIP, cHelperNeighbours, cHelperNone, cHelperParities, cHelperRings, cHelperRingsSimple, cHelperSymmetryDiastereotopic, cHelperSymmetryEnantiotopic, cHelperSymmetrySimple, cMaxAtomicNo, cMoleculeColorDefault, cMoleculeColorNeutral, cRoundedMass, mAllAtoms, mAllBonds, mAtomCharge, mAtomCustomLabel, mAtomFlags, mAtomicNo, mAtomList, mAtomMapNo, mAtomMass, mAtomQueryFeatures, mBondAtom, mBondFlags, mBondQueryFeatures, mBondType, mChirality, mCoordinates, mIsFragment, mIsRacemate, mMaxAtoms, mMaxBonds, mProtectHydrogen, mValidHelperArrays
-
-
Constructor Summary
Constructors Constructor Description Molecule3D()Molecule3D(int a, int b)Molecule3D(Molecule3D mol)Molecule3D(StereoMolecule mol)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddAtom(int atomicNo)Add an atom with the given atomicNointaddAtom(Molecule3D m, int i)Add an atom by copying its properties from the given Molecule3D This has to be overriden by subclassesvoidclear()Empties the molecule to serve as container for constructing a new molecule, e.g.voidcompact()intcompareTo(Molecule3D o)protected int[]compressMolTable()intcopyAtom(Molecule destMol, int sourceAtom, int esrGroupOffsetAND, int esrGroupOffsetOR)Creates a new atom in destMol and copies all source atom properties including atom list, custom label, flags, and mapNo to it.voiddeleteAtom(int atom)High level function for constructing a molecule.voiddeleteAtoms(java.util.List<java.lang.Integer> atomsToBeDeleted)booleanequals(java.lang.Object obj)intfusion(Molecule3D m2)This method will append a Molecule3D to the end.java.lang.StringgetAtomAmino(int atm)doublegetAtomBfactor(int atm)java.lang.StringgetAtomChainId(int atm)java.lang.StringgetAtomDescription(int atm)intgetAtomFlags(int atm)java.lang.StringgetAtomName(int atm)intgetAtomSequence(int atm)intgetAttachedHydrogenCount(int atom)java.lang.ObjectgetAuxiliaryInfo(java.lang.String name)java.util.Map<java.lang.String,java.lang.Object>getAuxiliaryInfos()intgetBond(int a1, int a2)Coordinates[]getCoordinates()intgetInteractionAtomType(int atm)java.lang.StringgetName()Allows to set a molecule name or identifier, that is, for instance, written to or read from molfiles.intgetNMovables()intgetOccupiedValence(int atom)The sum of bond orders of explicitly connected neighbour atoms including explicit hydrogen.doublegetPartialCharge(int a)int[]getPPP(int atm)intgetResSequence(int atm)java.lang.StringgetShortName()booleanisAtomFlag(int atm, int flag)booleanisMoleculeInOrder()booleanreorderAtoms()Reorganizes atom indexes, so that moveable atoms are firstvoidsetAllAtomFlag(int flag, boolean value)voidsetAtomAmino(int atm, java.lang.String a)voidsetAtomBfactor(int atm, double bfactor)voidsetAtomChainId(int atm, java.lang.String a)voidsetAtomDescription(int atm, java.lang.String s)voidsetAtomFlag(int atm, int flag, boolean value)voidsetAtomFlags(int atm, int flags)voidsetAtomName(int atm, java.lang.String a)voidsetAtomSequence(int atm, int a)voidsetAttachedHydrogenCount(int atom, int value)Defines a number of attached hydrogens without known 3D-coordinatesvoidsetAuxiliaryInfo(java.lang.String name, java.lang.Object value)voidsetBondOrder(int bond, int order)Sets the bond type based on bond order without stereo orientation.voidsetCoordinates(int atom, Coordinates c)voidsetInteractionAtomType(int atm, int type)voidsetMaxAtoms(int v)Usually called automatically and hardly needed to be called.voidsetPartialCharge(int a, double v)voidsetPPP(int atm, int[] a)voidsetResSequence(int atm, int a)voidswapAtoms(int atom1, int atom2)Swaps two atoms' indexes/locations in the atom table.java.lang.StringtoString()-
Methods inherited from class com.actelion.research.chem.StereoMolecule
copyMoleculeProperties, createMolecule, ensureHelperArrays, getAbsoluteAtomParity, getAbsoluteBondParity, getCanonizer, getChiralText, getCompactCopy, getERSGroupMemberCounts, getFragments, getFragments, getIDCode, getIDCoordinates, getStereoCenterCount, getSymmetryRank, setAssignParitiesToNitrogen, setUnknownParitiesToExplicitlyUnknown, stripStereoInformation, translateTHParity, validate
-
Methods inherited from class com.actelion.research.chem.ExtendedMolecule
addFragment, bondsAreParallel, canonizeCharge, canonizeCharge, convertStereoBondsToSingleBonds, copyMoleculeByAtoms, copyMoleculeByBonds, findAlleneCenterAtom, findAlleneEndAtom, findBINAPChiralityBond, findRingSystem, getAllConnAtoms, getAllConnAtomsPlusMetalBonds, getAllHydrogens, getAromaticRingCount, getAtomPi, getAtomPreferredStereoBond, getAtomRingBondCount, getAtomRingCount, getAtomRingSize, getAtoms, getAverageBondLength, getAverageTopologicalAtomDistance, getBondPreferredStereoBond, getBondRingSize, getBonds, getCenterGravity, getCenterGravity, getConnAtom, getConnAtoms, getConnBond, getConnBondOrder, getExcludedNeighbourCount, getExplicitHydrogens, getFisherProjectionParity, getFragmentAtoms, getFragmentAtoms, getFragmentNumbers, getFragmentNumbers, getFreeValence, getHandleHydrogenAtomMap, getHandleHydrogenBondMap, getHandleHydrogenMap, getHelperArrayStatus, getImplicitHigherValence, getImplicitHydrogens, getLowestFreeValence, getMetalBondedConnAtoms, getMolweight, getNonHydrogenNeighbourCount, getPath, getPathBonds, getPathLength, getPathLength, getPlainHydrogens, getRingSet, getRingSetSimple, getRotatableBondCount, getStereoBond, getSubstituent, getSubstituentSize, getZNeighbour, isAlkaliMetal, isAllylicAtom, isAmideTypeBond, isAromaticAtom, isAromaticBond, isBINAPChiralityBond, isCentralAlleneAtom, isChalcogene, isDelocalizedBond, isEarthAlkaliMetal, isFlatNitrogen, isHalogene, isNitrogenFamily, isPseudoRotatableBond, isRingAtom, isRingBond, isSimpleHydrogen, isSmallRingAtom, isSmallRingBond, isStabilizedAtom, normalizeAmbiguousBonds, removeExplicitHydrogens, removeExplicitHydrogens, setParitiesValid, setStereoBondFromAtomParity, setStereoBondFromBondParity, setStereoBondsFromParity, shareSameFragment, stripSmallFragments, stripSmallFragments, supportsImplicitHydrogen, validateBondType
-
Methods inherited from class com.actelion.research.chem.Molecule
addAtom, addAtom, addAtom, addBond, addBond, addMolecule, addOrChangeAtom, addOrChangeBond, addRing, addRingToAtom, addRingToBond, addSubstituent, addSubstituent, calculateTorsion, center, changeAtom, changeAtomCharge, changeAtomCharge, changeBond, copyBond, copyBond, copyMolecule, deleteAtomOrBond, deleteAtoms, deleteAtoms, deleteBond, deleteBondAndSurrounding, deleteMarkedAtomsAndBonds, deleteMolecule, deleteSelectedAtoms, findAtom, findBond, getAllAtoms, getAllBonds, getAngle, getAngleDif, getAtomAbnormalValence, getAtomCharge, getAtomCIPParity, getAtomColor, getAtomCoordinates, getAtomCustomLabel, getAtomCustomLabelBytes, getAtomESRGroup, getAtomESRType, getAtomicNo, getAtomicNoFromLabel, getAtomLabel, getAtomList, getAtomListString, getAtomMapNo, getAtomMass, getAtomParity, getAtomQueryFeatures, getAtomRadical, getAtomX, getAtomY, getAtomZ, getAverageBondLength, getAverageBondLength, getAverageBondLength, getAverageBondLength, getBondAngle, getBondAtom, getBondBridgeMaxSize, getBondBridgeMinSize, getBondCIPParity, getBondESRGroup, getBondESRType, getBondLength, getBondOrder, getBondParity, getBondQueryFeatures, getBondType, getBondTypeSimple, getBounds, getChirality, getCoordinates, getDefaultAverageBondLength, getDefaultMaxValenceUncharged, getDeleteAtomsBondMap, getDeleteAtomsBondMap, getElectronValenceCorrection, getMaxAtoms, getMaxBonds, getMaxValence, getMaxValenceUncharged, getMoleculeColor, getStereoProblem, getUserData, invalidateHelperArrays, is3D, isAtomConfigurationUnknown, isAtomicNoElectronegative, isAtomicNoElectropositive, isAtomMarkedForDeletion, isAtomParityPseudo, isAtomStereoCenter, isAutoMappedAtom, isBondBackgroundHilited, isBondBridge, isBondForegroundHilited, isBondMarkedForDeletion, isBondParityPseudo, isBondParityUnknownOrNone, isElectronegative, isElectropositive, isFragment, isMarkedAtom, isMetalAtom, isNaturalAbundance, isOrganicAtom, isPurelyOrganic, isSelectedAtom, isSelectedBond, isStereoBond, isStereoBond, markAtomForDeletion, markBondForDeletion, removeAtomColors, removeAtomCustomLabels, removeAtomMarkers, removeAtomSelection, removeBondHiliting, removeMappingNo, removeQueryFeatures, renumberESRGroups, scaleCoords, setAllAtoms, setAllBonds, setAtomAbnormalValence, setAtomCharge, setAtomCIPParity, setAtomColor, setAtomConfigurationUnknown, setAtomCustomLabel, setAtomCustomLabel, setAtomESR, setAtomicNo, setAtomList, setAtomList, setAtomMapNo, setAtomMarker, setAtomMass, setAtomParity, setAtomQueryFeature, setAtomRadical, setAtomSelection, setAtomStereoCenter, setAtomX, setAtomY, setAtomZ, setBondAtom, setBondBackgroundHiliting, setBondCIPParity, setBondESR, setBondForegroundHiliting, setBondParity, setBondParityUnknownOrNone, setBondQueryFeature, setBondType, setChirality, setDefaultAverageBondLength, setFragment, setHelperValidity, setHydrogenProtection, setMaxBonds, setMoleculeColor, setName, setStereoProblem, setToRacemate, setUserData, stripIsotopInfo, suggestBondType, swapBonds, translate, translateCoords, zoomAndRotate, zoomAndRotateInit
-
-
-
-
Field Detail
-
RIGID
public static final int RIGID
- See Also:
- Constant Field Values
-
LIGAND
public static final int LIGAND
- See Also:
- Constant Field Values
-
BACKBONE
public static final int BACKBONE
- See Also:
- Constant Field Values
-
FLAG1
public static final int FLAG1
- See Also:
- Constant Field Values
-
IMPORTANT
public static final int IMPORTANT
- See Also:
- Constant Field Values
-
PREOPTIMIZED
public static final int PREOPTIMIZED
- See Also:
- Constant Field Values
-
ATTACHED_HYDROGEN_COUNT
public static final int ATTACHED_HYDROGEN_COUNT
- See Also:
- Constant Field Values
-
ATTACHED_HYDROGEN_COUNT_SHIFT
public static final int ATTACHED_HYDROGEN_COUNT_SHIFT
- See Also:
- Constant Field Values
-
INFO_DESCRIPTION
public static final int INFO_DESCRIPTION
- See Also:
- Constant Field Values
-
INFO_ATOMSEQUENCE
public static final int INFO_ATOMSEQUENCE
- See Also:
- Constant Field Values
-
INFO_INTERACTION_ATOM_TYPE
public static final int INFO_INTERACTION_ATOM_TYPE
- See Also:
- Constant Field Values
-
INFO_ATOMNAME
public static final int INFO_ATOMNAME
- See Also:
- Constant Field Values
-
INFO_AMINO
public static final int INFO_AMINO
- See Also:
- Constant Field Values
-
INFO_PPP
public static final int INFO_PPP
- See Also:
- Constant Field Values
-
INFO_CHAINID
public static final int INFO_CHAINID
- See Also:
- Constant Field Values
-
INFO_BFACTOR
public static final int INFO_BFACTOR
- See Also:
- Constant Field Values
-
INFO_RESSEQUENCE
public static final int INFO_RESSEQUENCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Molecule3D
public Molecule3D(Molecule3D mol)
-
Molecule3D
public Molecule3D(StereoMolecule mol)
-
Molecule3D
public Molecule3D()
-
Molecule3D
public Molecule3D(int a, int b)
-
-
Method Detail
-
getOccupiedValence
public int getOccupiedValence(int atom)
Description copied from class:ExtendedMoleculeThe 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:
getOccupiedValencein classExtendedMolecule- 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:
toStringin classjava.lang.Object
-
clear
public void clear()
Description copied from class:MoleculeEmpties the molecule to serve as container for constructing a new molecule, e.g. by multiply calling addAtom(...), addBond(...) and other high level methods.
-
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:MoleculeSets the bond type based on bond order without stereo orientation.- Overrides:
setBondOrderin classMoleculeorder- 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:
getBondin classExtendedMolecule- 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:MoleculeAllows to set a molecule name or identifier, that is, for instance, written to or read from molfiles.
-
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:
equalsin classjava.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:MoleculeUsually called automatically and hardly needed to be called.- Overrides:
setMaxAtomsin classMolecule
-
copyAtom
public int copyAtom(Molecule destMol, int sourceAtom, int esrGroupOffsetAND, int esrGroupOffsetOR)
Description copied from class:MoleculeCreates a new atom in destMol and copies all source atom properties including atom list, custom label, flags, and mapNo to it.
-
compact
public void compact()
-
swapAtoms
public void swapAtoms(int atom1, int atom2)Description copied from class:MoleculeSwaps 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.
-
addAtom
public int addAtom(int atomicNo)
Add an atom with the given atomicNo
-
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:
deleteAtomin classMolecule- Parameters:
atom-
-
compressMolTable
protected int[] compressMolTable()
- Overrides:
compressMolTablein classMolecule
-
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:
compareToin interfacejava.lang.Comparable<Molecule3D>
-
-