Class MoleculeGraph
- All Implemented Interfaces:
- MoleculeWithValence<MolAtom>,- chemaxon.core.structure.MoleculeForBuilder,- MTransformable,- StereoConstants,- Serializable
- Direct Known Subclasses:
- Molecule,- SelectionMolecule
- Since:
- Marvin 3.0, 10/11/2002
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumDeprecated, for removal: This API element is subject to removal in a future version.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intAromatization type for ambiguous 5-membered rings.static final intBasic aromatization.static final intHuckel aromatization.static final intGeneral (Daylight conform) aromatization.static final intLoose aromatization.static final intSubstructure aromatization.protected intThe number of atoms.protected static final intDeprecated, for removal: This API element is subject to removal in a future version.protected intThe number of bonds.protected BondTableBond table.static final intCache removal option for clearing all cached info.static final intCache removal option for remove module used in aromatization.static final intCache removal option for cacheMemory.static final intCache removal option for remove module used in graph invariant calculation.static final intCache removal option for remove module used in parity calculation.static final intCache removal option for remove module used in sssr.static final intCache remove option to clear ctab and btab.protected int[][]Connection table.static final intGeneral dearomatization.static final intDearomatize method which dearomatizes only that molecules which fullfills the Huckel's rule.static final intDearomatize method which dearomatizes only that molecules which fullfills the Huckel's rule.protected static final intDimension bits in flags.static final intBasic fragmentation, only atom - atom connections (bond) are considered.static final intFragmentation without breaking multicenter S-groups.static final intFragmentation without breaking S-groups.static final intNumber of fragmentation types.chemaxon.struc.gearch.MoleculeGraphGearchstatic final intGraph invariant option to instruct that the graph invariant should not be stored in MoleculeGraph.static final intGraph invariant option for ignoring explicit hydrogens.static final intGraph invariant option for calculating graph invariants using the old stereo method.static final intGraph invariant option for calculating graph invariants using stereo information.static final intGraph invariant option for calculating graph invariants considering atom maps also.static final intUnified mask of graph invariant options affecting grinv value.protected longGraph invariant change count.protected static final intInitial capacity of the atoms and bonds vectors.static final Stringstatic final intThe minimal size of the ring for the existence of TRANS double bond.static final intOmit arranging process after the hydrogen addition.protected doubleOrigin x.protected doubleOrigin y.protected doubleOrigin z.protected MoleculeGraphThe structure that contains this molecule graph as a substructure.protected MPropertyContainerstatic final intPerform all clean-up methods when removing an atom or a bond.static final intWhen removing an atom or a bond, also remove the bond(s) from the atom object(s).protected static final intRemove called from RxnMolecule.fixComponent.static final intRemove graphics objects containing the removed atom.static final intDo not perform any clean-up methods when removing an atom or a bond.static final intRemove atom from parent document.static final intWhen removing a H atom, keep stereo information unchanged.protected MoleculeGraphParent of all parents.protected MolAtom[]The atoms (nodes).protected MolBond[]The bonds (edges).protected booleanprotected static final intValence check calculation bit in flags.protected static final intDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced byValenceCheckOptions.Fields inherited from interface chemaxon.struc.StereoConstantsANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_ALL_POSSIBLE, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CIS_TRANS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_NONE, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an atom to the molecule.voidAdds a bond to the molecule.voidAdd a bond to the molecule.protected voidAdds an atom.protected voidAdds all atoms and bonds to the specified molecule.protected voidaddAtomToFragment(MolAtom atom) Adds an atom to a fragment.protected intAdds an atom without setting its parentGraph and index fields.protected voidAdds a bond.protected final intAdds a bond without setting its parentGraph and index fields.booleanaddExplicitHydrogens(int f) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int).
 Usage:booleanaddExplicitHydrogens(int f, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int).
 Usage:voidDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[]).
 Usage:protected intAdds a non-SgroupAtom atom without setting its parentGraph and index fields.voidChecks whether the molecule has multiple chiral centresfinal voidAromatize molecule using the default general aromatization method.voidaromatize(boolean a) Aromatize (using the default general aromatization method) or dearomatize molecule.voidaromatize(int method) Aromatizes molecule.voidaromatize(int method, boolean checkAmbiguity) Aromatizes molecule.booleanDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleanUtil.arrangeComponents(MoleculeGraph, boolean, boolean).
 Usage:atoms()Provides an unmodifiable list view of the atoms in the molecule.doubleCalculates the regular bond length.bonds()Provides an unmodifiable list view of the bonds in the molecule.Calculates the geometrical center.voidCalculates the geometrical center.intcalcDehydrogenizedGrinv(int[] gi) Calculates the graph invariants with the assumption that hydrogens are removed.doubleCalculates the molecule height.voidCalculates and sets hybridazation state for each atom.Calculates the outer rectangle.voidCalculates the outer rectangle.Calculates the center of the outer rectangle.voidCalculates the center of the outer rectangle.doubleCalculates the molecule width.booleancanBeCT(int i2, int i3) Determines whether the bond between the specified atoms can be a CIS/TRANS or not.booleancanBeCT(int i2, int i3, boolean grcheck) Determines whether the bond between the specified atoms can be a CIS/TRANS or not.booleanDetermines whether the given bond can be a CIS/TRANS or not.protected voidvoidDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, no replacement.
 Not intended for public use, it was intended only for internal debugging.booleanDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.clean(MoleculeGraph, int, String).booleanclean(int dim, String opts, MProgressMonitor pmon) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.clean(MoleculeGraph, int, String, MProgressMonitor).voidclear()Clears the molecule.voidclearCachedInfo(int options) Deletes the cached information depending on the given options.voidclearForImport(String format) Clears the bonds vector, the properties, the flags, and sets the origin coordinates to 0.clone()Make an identical copy of the molecule.protected intcloneAtoms(int[] cnodes, MoleculeGraph graph) Copies the specified atoms.voidclonecopy(int[] iatoms, MoleculeGraph g) Copies the specified atoms of this molecule graph to another one.voidMake another molecule identical to this one.protected booleanclonecopyMoleculeGraphWithoutSgroups(int[] cnodes, MolBond[] cedges, int nb, MoleculeGraph graph) Copies the specified atoms and bonds of this molecule graph to another one.voidclonelesscopy(MoleculeGraph graph) Deprecated.as of Marvin 6.3.
 Not supported feature.protected voidconnectOriginalBondsToNewAtom(MolAtom newAtom, MolAtom orig, MolBond[] bonds) Sets the original connections to the new atom.booleanChecks if the molecule graph contains the specified atom.booleanChecks if the molecule graph contains the specified bond, or a bond which is equals with the given bond.booleancontains(MoleculeGraph graph) Does the molecule graph contain the specified fragment?protected MoleculeGraphCreates a dehydrogenized version of the molecule.protected chemaxon.struc.gearch.MoleculeGraphGearchprotected final SmoleculeDeprecated.UseMoleculeorMoleculeGraphinsteadbooleanDearomatize molecule.booleandearomatize(int method) Dearomatize molecule.protected final intFinds an atom in the atoms array.Finds the clone of an atom.final <C extends MoleculeGraph>
 C[]findBasicFrags(Class<C> cl) Determines the disconnected fragments and puts them into an array.protected final intFinds a bond in the bonds array.final int[]Deprecated, for removal: This API element is subject to removal in a future version.final int[]findComponentIds(int[] inds) Assigns a component ID to each connected component formed by the specified atom indexes.final voidfindFrag(int i, int fragmentationType, MoleculeGraph frag) Determines the subgraph connected to the specified atom.final voidfindFrag(int i, MoleculeGraph frag) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.6, replaced byfindFrag(int, int, MoleculeGraph)andFRAG_KEEPING_MULTICENTERS.
 Usage:final voidfindFragById(int fragId, int fragmentationType, MoleculeGraph frag) Determines the subgraph corresponding to the specific fragment ID.<C extends MoleculeGraph>
 C[]Deprecated, for removal: This API element is subject to removal in a future version.<C extends MoleculeGraph>
 C[]Determines the disconnected fragments and puts them into an array.protected static intfindInArray(Object[] array, int[] indices, int n, Object o) Finds an object in an array.voidDelegates to tracker's fixProperties().protected booleanFix a property containing reference to the molecule.final voidfuse(MoleculeGraph graph) Adds those atoms and bonds of another molecule to this one that are not already elements.voidfuse(MoleculeGraph graph, boolean check) Adds atoms and bonds of another molecule to this one.protected voidfuse0(MoleculeGraph g, boolean check) Adds the atoms and bonds of another molecule to this one.If the given atom is an abbreviation returns the expanded structure, otherwise returns null.int[][][]getAromaticAndAliphaticRings(int aromatizationType, boolean onlyAromrings, boolean aromatize, int maxRingSize, int ringsLimit) Returns the aromatic and or aliphatic ring atom indexes.
 Note: This method does not aromatize the already aromatized rings.getAtom(int n) Gets the nth atom.MolAtom[]Creates an array of atoms.intGets the number of atoms.intgetAtomCount(int atomicNumber) Gets the number of atoms with the given atomic number.intgetAtomicNumber(MolAtom atom) Gets the atomic number of the given atom.Returns an iterator over the atoms in this molecule in proper sequence.Deprecated, for removal: This API element is subject to removal in a future version.Useatoms()instead.getBond(int n) Gets the nth bond.MolBond[]Creates an array of bonds.intGets the number of bonds.Returns an iterator over the bonds in this molecule in proper sequence.protected MolBond[]Returns the bonds attached to the given atom in this molecule graph.Gets the bond (edge) table.intGets the charge of the given atom.intgetChirality(int i) Computes the chirality of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those.final int[][]getCSSR()Gets the Complete Set of Smallest Ring atom indexes array.int[][]Get the cssr ring indexes in which the atom (specified with it's index) can be located.int[][]getCtab()Gets the connection table.doublegetDesiredLength(int atno1, int atno2, int type) Deprecated, for removal: This API element is subject to removal in a future version.doubleDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.11, replaced byMolBond.desiredLength(int, int, int, int),MolBond.getType()andgetDim().
 Usage:intgetDim()Gets the dimension.Gets the document object.protected MDocumentGets the parent document for a child molecule graph.DPoint3[]Gets the cube that encloses the atoms of molecule graph.doubleCalculates the molecular weight of the molecule using the mass of the most frequent natural isotope of the atoms.intGets the total number of explicit hydrogens attached to the molecule.intgetExplicitLonePairCount(int i) Deprecated.For internal use only.getEZStereo(MolBond bond) Gets E/Z stereo information for the given double bond.intgetFlags()Gets the dimension and chiral flags.final MoleculeGraphGets the first parent.intGets the (total) formal charge of the molecule.Gets the molecular formula.final intDeprecated, for removal: This API element is subject to removal in a future version.final intgetFragCount(int fragmentationType) Returns the number of fragments for the given fragmentation type.final int[]getFragIds(int fragmentationType) Gets an array containing the fragment id for each atom for the given fragmentation type.intReturns the number of the free attachment points for the given atom.Gets a molecule graph containing all the atoms and bonds.protected int[]getGrinv()Gets the graph invariants array.intgetGrinv(int[] gi) Gets the graph invariants (canonical labels).intgetGrinv(int[] gi, boolean uniqueFlag) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 4.0, replaced bygetGrinv(int[], int).
 Usage:intgetGrinv(int[] gi, int options) Gets the graph invariants (canonical labels).final longGets the graph invariant change count.intGets graph invariant calculation options passed to the module.intGets the total number of implicit hydrogens attached to the molecule.intgetImplicitHCount(MolAtom atom) Gets the number of implicit hydrogens attached to the given atom.Gets the n-th ligand of the given atom.intgetLigandAtno(MolAtom atom, int n) Gets the atomic number of the n-th ligand of the given atom.getLigandBondType(MolAtom atom, int i) Gets the type of the n-th ligand bond of the given atom.intgetLigandCount(MolAtom atom) Gets the number of ligands of the given atom.intgetLocalParity(int i) Computes the local parity of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those.Gets the origin of the molecule.final ObjectgetLock()Gets the lock object for synchronization.intgetLonePairCount(int i) Deprecated.useMolAtom.getLonePairCount()insteaddoublegetMass()Calculates the molecular weight of the molecule.intReturns the maximal attachment point order of R-group attachment point atoms in this molecule graph.getName()Gets the molecule title/name.final MoleculeGraphGets the parent graph that contains this substructure.protected MDocumentGets the document or the document of the parent graph.intgetParity(int i) Computes the parity of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those.intgetParityType(int idx) Gets parity type.DPoint3[]Gets an array containing the atom coordinates.protected intgetPossibleAttachmentPoints(MolAtom molAtom) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced bySuperatomSgroup.getAttachmentPointOrders(MolAtom)andMolAtom.getAttachParentSgroup().
 Usage:intgetRadicalCount(MolAtom atom) Gets the number of free electrons of the given atom.int[]Get the smallest ring size in which the atom (specified with it's index) can be located.final int[][]getSSSR()Gets the Smallest Set of Smallest Ring atom indexes array.final int[][]Gets the Smallest Set of Smallest Ring bond indexes array.final BitSet[]Gets the Smallest Set of Smallest Ring edges as an array of BitSets, one BitSet for each ring.Get SSSR bond index bitset.long[]Deprecated.as of 15.09.2014, usegetSSSRBondSet()insteadint[][]Get the sssr ring indexes in which the atom (specified with it's index) can be located.intgetStereo2(int i1, int i2, int i3, int i4) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.intgetStereo2(MolAtom a1, int i2, int i3, MolAtom a4) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.intGets cis/trans (Z/E) stereo information for the given bond.protected final intgetStereo2(MolBond b, MolAtom a1, int i2, int i3, MolAtom a4) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.protected final intgetStereo2(MolBond b, MolAtom a1, int i2, int i3, MolAtom a4, boolean grcheck) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.intgetStereo2(MolBond b, MolAtom a1, MolAtom a4) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.intgetStereo2(MolBond b, MolAtom a1, MolAtom a4, boolean grcheck) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.protected intGets the number of all "submolecules".final MoleculeGraph[]Gets all "submolecules".protected voidgetSubGraphs(MoleculeGraph[] m, int off) Gets all "submolecules".intGets the total (formal) charge of the molecule.Returns the options for valence checking.Deprecated, for removal: This API element is subject to removal in a future version.intgetValenceProperty(MolAtom atom) Gets the valence property of the given atom.double[]Returns the coordinates of the given atom (contained in the molecule).booleanTests whether the molecule graph has atom sets.booleanTests whether the molecule graph has atom sets.booleanDeprecated, for removal: This API element is subject to removal in a future version.useMDocument.hasExplicitLonePairs()insteadbooleanbooleanTests whether the molecule has implicit hydrogen atoms.final booleanTests whether the property list contains the molecule.booleanDetermines if this molecule has a valence error on any of its atoms.booleanhydrogenize(boolean add) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitHToExplicit(MoleculeGraph)andHydrogenize.convertExplicitHToImplicit(MoleculeGraph).final voidimplicitizeHydrogens(int f) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, int).
 Usage:voidimplicitizeHydrogens(int f, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int).
 Usage:voidimplicitizeHydrogens(int f, MolAtom[] atoms, boolean check) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean).
 Usage:protected booleanimplicitizeHydrogens0(int f, MolAtom[] atoms, boolean check) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean).
 Usage:protected final voidIncreases the graph invariant change count and sets grinv to null.protected final voidincGrinvCC(boolean isSSSRReset) final voidIncreases the graph invariant change count, but does not change grinv.intGets the index of the specified atom.intGets the index of the specified bond.final voidinsertAtom(int i, MolAtom atom) Deprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph.final voidinsertBond(int i, MolBond bond) Deprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph.voidinsertBondInOrder(MolBond e, MolBond[] order) Insert a bond in the order specified as the second argument.protected voidinsertNullAtoms(int i, int count) Insert nulls into the atom array.protected voidinsertNullBonds(int i, int count) Insert nulls into the bond array.booleanGets the absolute stereoconfiguration flag.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanisAtom()Deprecated.As of Marvin 14.7.7, no replacement.
 Not supported feature.booleanisAtomInRing(MolAtom atom) Checks whether the atom is in ring.booleanisBond()Deprecated.As of Marvin 14.7.7, no replacement.
 Not supported feature.protected booleanChecks if there is a bond parallel (having same endpoints) with the given bond in this MoleculeGraph.booleanisEmpty()Tests whether the molecule graph is empty.protected booleanTests whether the graph invariant change count is valid.booleanReturnstrueif large molecule (number of atoms exceeds1000).booleanDeprecated, for removal: This API element is subject to removal in a future version.as of Marvin 14.7.7, no replacement.
 Usage:booleanReturns the multiple chirality flag.protected voidIsolates atom: a more efficient way of removing an atom thanremoveAtom(chemaxon.struc.MolAtom), especially for large molecule graphs.protected voidIsolates bond: a more efficient way of removing a bond thanremoveBond(chemaxon.struc.MolBond), especially for large molecule graphs.booleanGet how parity module interpret wedges.booleanisQuery()Indicates if the molecule has query features: query atoms or query bonds.protected booleanCan it be a real atom parent?booleanisRing()Deprecated.As of Marvin 14.7.7, no replacement.
 Not supported feature.booleanisRingBond(int idx) Is this bond in ring?booleanTests whether the specified property is a self reference to the molecule.booleanTests if the molecule graph is similar to another graph.booleanTests whether the molecule graph is symmetric.booleanDetermines whether valence check is enabled on this molecule graph.booleanisValidLinkNode(int linkAtomIdx, int outer1, int outer2) Checks whether the specified link atom is valid or not.protected voidCopies some properties of this molecule to the other one specified as argument.voidmergeAtoms(MolAtom replacementAtom, MolAtom origAtom) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.2, useMergeUtil.mergeAtoms(MolAtom, MolAtom, boolean)instead.intmergeFrags(int id1, int id2, int fragmentationType) Merges two connected components of the given fragmentation type.voidMove the molecule.Creates a new MoleculeGraph object.voidpack()Reduce memory usage.booleanpartialClean(int dim, int[] fixed, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.partialClean(MoleculeGraph, int, int[], String).booleanpartialClean(Molecule[] template, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.partialClean(Molecule, Molecule[], String).booleanpartialClean(MoleculeGraph template, int[] map, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.partialClean(MoleculeGraph, MoleculeGraph, int[], String).Gets the property container.voidqpropCheck(List<MolAtom> v) Check for query property errors.voidRegenerates the bond vector: remove its elements, then put the bond objects from the atoms into it.protected voidRegenerates the bond table.protected voidRegenerates the connection table.protected final voidRecreate graph search results object.voidRemoves all the atoms and bonds.voidRemoves all bonds.voidremoveAtom(int i) Removes an atom and its bonds by index.voidremoveAtom(int i, int cleanupFlags) Removes an atom and its bonds with extra clean-up options.voidremoveAtom(MolAtom atom) Removes an atom and its bonds by reference.voidremoveAtom(MolAtom atom, int cleanupFlags) Removes an atom and its bonds with extra clean-up options.voidremoveBond(int i) Removes a bond by index.protected voidremoveBond(int i, int cleanupFlags) Removes a bond by index.voidremoveBond(MolBond bond) Removes a bond by reference.protected voidremoveBond(MolBond bond, int cleanupFlags) Removes a bond by reference.voidDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitLonePairsToImplicit(MoleculeGraph).protected voidRemoves thenullatom entries in the atoms array and sets the index fields appropriately.protected voidRemoves thenullbond entries in the bonds array and sets the index fields appropriately.voidreplaceAtom(int i, MolAtom newAtom) Replaces the atom on the given index with the parameter atom and removes the parameter atom from its original parent molecule if needed.voidreplaceBond(MolBond oldb, MolBond newb) Deprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph.protected voidAn operation performed that changed the connection table and the graph invariants.protected final voidGraph invariants must be recalculated for this graph and all parent graphs.protected Object[]restoreCache(int n) Restores caches like connection table, bond table, etc.voidRevalidate coordinate dependent properties.protected Object[]saveCache(int n) Saves caches like connection table, bond table, etc.voidsetAbsStereo(boolean c) Sets the absolute stereoconfiguration flag.voidDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph.protected voidSets the atom at the specified index.final voidsetAtomSetSeqs(int id) Sets the set sequence number of all atoms.voidDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph.final voidsetBondSetSeqs(int id) Sets the set sequence number of all bonds.booleansetChirality(int i, int c) Set chirality of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those.booleansetChirality(Map<Integer, Integer> chiralities) Sets the chiralities of atoms.voidsetDim(int d) Sets the dimension.protected voidsetFlags(int f) Sets the flags of the molecule.protected voidsetFlags(int f, int mask) Sets specified bits in the flags.protected final voidsetGrinvCC(long g) Sets the graph invariant change count.voidsetGrinvOptions(int opt) Sets graph invariant calculation options passed to the module.voidSets link node outer atoms to default values, if they are not set yet; making sure that the resulting link node configuration is valid.booleansetLocalParity(int[] p, boolean useActualWedges) In case of 2D molecule change the bonds flag (UP/DOWN), in case of 0D molecule set the atom flags to achieve the specified parity array.booleansetLocalParity(int[] idxes, int[] p, boolean useActualWedges) Set given local parity for the given atomic indexes.voidSet the origin of the molecule.booleansetParity(int[] p) Change the bonds flag (UP/DOWN) connected to the whole molecule to achieve the specified parity array.booleansetParity(int[] p, boolean useActualWedges) Change the bonds flag (UP/DOWN) connected to the whole molecule to achieve the specified parity array.booleansetParity(int i, int p) Change the bonds flag (UP/DOWN) connected to the given atom to achieve the specified parity.protected voidsetSupergraph(MoleculeGraph molecule) Sets the given molecule as the supergraph of this graph.voidsetValenceCheckEnabled(boolean b) Enables or disables valence check on this molecule graph, depending on the value of the parameter b.voidSets the options for valence checking.voidDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced bysetValenceCheckOptions(ValenceCheckOptions)andsetValenceCheckEnabled(boolean).
 Usage:final Smoleculesmol()Deprecated.UseMoleculeorMoleculeGraphinsteadvoidsortBondsAccordingTo(MolBond[] order) Sorts bonds in the same order as they appear in another chemical graph.booleanReset the wedges of the molecule, based on the actual parity information in 2D, remove wedges in 3D.protected voidsumConservedQuantities(MolAtom a, int[] atoms, int sign) For internal use only.toString()Overrides MoleculeGraph.toString() to ease debugging.voidApply a transformation matrix to the atomic coordinates.voidtransform(CTransform3D t, boolean incg) Apply a transformation matrix to the atomic coordinates.protected final voidUpdates the dimensions when fusing two structures.voiduseOnlyFirstAtomInStereoCalculation(boolean f) Set how parity module should interpret wedes.voidCheck valence and query property errors for atoms.voidvalenceCheck(List<MolAtom> v) Check valence and query property errors.
- 
Field Details- 
INITIAL_CAPACITYprotected static final int INITIAL_CAPACITYInitial capacity of the atoms and bonds vectors.- See Also:
 
- 
AROM_BASICpublic static final int AROM_BASICBasic aromatization.- Since:
- Marvin 4.1, 12/09/2005
- See Also:
 
- 
AROM_GENERALpublic static final int AROM_GENERALGeneral (Daylight conform) aromatization.- Since:
- Marvin 4.1, 12/09/2005
- See Also:
 
- 
AROM_LOOSEpublic static final int AROM_LOOSELoose aromatization.- Since:
- Marvin 5.2, 01/11/2008
- See Also:
 
- 
AROM_SUBSTRUCTUREpublic static final int AROM_SUBSTRUCTURESubstructure aromatization. Used internally.- Since:
- Marvin 5.3, 09/14/2009
- See Also:
 
- 
AROM_AMBIGUOUSpublic static final int AROM_AMBIGUOUSAromatization type for ambiguous 5-membered rings. This option of aromatization checks 5-membered rings with bond pattern similar to pyrrole and having A, AH, Q, QH, atom list (with ambiguous atom types) or not list at the N position (with the two single bonds). In that particular ring, the bonds are replaced by "single or aromatic" and "double or aromatic" bonds. Fusion with aromatic rings are tricky, the aromatic rings should be aromatized first.- Since:
- Marvin 5.4, 08/14/2010
- See Also:
 
- 
AROM_CHUCKELpublic static final int AROM_CHUCKELHuckel aromatization.- Since:
- Marvin 16.12, 09/12/2016
- See Also:
 
- 
DEAROM_GENERALpublic static final int DEAROM_GENERALGeneral dearomatization.- Since:
- Marvin 5.2.3, 06/29/2008
- See Also:
 
- 
DEAROM_HUCKELCHECKpublic static final int DEAROM_HUCKELCHECKDearomatize method which dearomatizes only that molecules which fullfills the Huckel's rule.- Since:
- Marvin 5.2.3, 06/29/2008
- See Also:
 
- 
DEAROM_HUCKELCHECK_EXpublic static final int DEAROM_HUCKELCHECK_EXDearomatize method which dearomatizes only that molecules which fullfills the Huckel's rule. The same as DEAROM_HUCKELCHECK but throws exception if dearomatization fails.- Since:
- Marvin 5.2.3, 06/29/2008
- See Also:
 
- 
INVALID_LINKNODE_MESSAGE- See Also:
 
- 
DIM_MASKprotected static final int DIM_MASKDimension bits in flags.- See Also:
 
- 
AUTO_UNGROUP@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) protected static final int AUTO_UNGROUPDeprecated, for removal: This API element is subject to removal in a future version.Automatic ungroup bit in flags. Specified changes will result in an automatic ungroup of the affected S-groups. Changes causing ungroup:- changes in atom type
- changes in bond type
 - See Also:
 
- 
VALENCE_CHECKprotected static final int VALENCE_CHECKValence check calculation bit in flags. Valence check will be called according to this flag.- Since:
- Marvin 5.4
- See Also:
 
- 
VALENCE_CHECK_AMBIGUOUS@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) protected static final int VALENCE_CHECK_AMBIGUOUSDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced byValenceCheckOptions.Valence check calculation bit in flags for checking ambiguous aromatic atoms requiring . Valence check of ambiguous atoms will be called according to this flag.- Since:
- Marvin 5.9
- See Also:
 
- 
RMCLEANUP_NONEpublic static final int RMCLEANUP_NONEDo not perform any clean-up methods when removing an atom or a bond.- Since:
- Marvin 3.1
- See Also:
 
- 
RMCLEANUP_EDGESpublic static final int RMCLEANUP_EDGESWhen removing an atom or a bond, also remove the bond(s) from the atom object(s).- Since:
- Marvin 3.1
- See Also:
 
- 
CACHE_REMOVE_ALLpublic static final int CACHE_REMOVE_ALLCache removal option for clearing all cached info.- See Also:
 
- 
CACHE_REMOVE_CACHEMEMORYpublic static final int CACHE_REMOVE_CACHEMEMORYCache removal option for cacheMemory.- See Also:
 
- 
RMCLEANUP_STEREOpublic static final int RMCLEANUP_STEREOWhen removing a H atom, keep stereo information unchanged.- Since:
- Marvin 3.1
- See Also:
 
- 
RMCLEANUP_MOBJECTpublic static final int RMCLEANUP_MOBJECTRemove graphics objects containing the removed atom.- Since:
- Marvin 4.1, 03/07/2006
- See Also:
 
- 
RMCLEANUP_FIXCOMPONENTprotected static final int RMCLEANUP_FIXCOMPONENTRemove called from RxnMolecule.fixComponent. For internal use only.- Since:
- Marvin 4.1.3, 11/16/2006
- See Also:
 
- 
RMCLEANUP_PARENTDOCpublic static final int RMCLEANUP_PARENTDOCRemove atom from parent document.- Since:
- Marvin 4.1.13, 09/06/2007
- See Also:
 
- 
RMCLEANUP_ALLpublic static final int RMCLEANUP_ALLPerform all clean-up methods when removing an atom or a bond.- Since:
- Marvin 3.1
- See Also:
 
- 
GRINV_NOHYDROGENpublic static final int GRINV_NOHYDROGENGraph invariant option for ignoring explicit hydrogens.- See Also:
 
- 
GRINV_STEREOpublic static final int GRINV_STEREOGraph invariant option for calculating graph invariants using stereo information. (Chirality invalid input: '&' E/Z)- See Also:
 
- 
GRINV_OLDSTEREOpublic static final int GRINV_OLDSTEREOGraph invariant option for calculating graph invariants using the old stereo method. (Chirality only.)- See Also:
 
- 
GRINV_USEMAPSpublic static final int GRINV_USEMAPSGraph invariant option for calculating graph invariants considering atom maps also.- See Also:
 
- 
GRINV_VALUE_OPTIONSpublic static final int GRINV_VALUE_OPTIONSUnified mask of graph invariant options affecting grinv value. But see values below that are not included into this value when introducing a new one to avoid undesired side-effects.- See Also:
 
- 
GRINV_DONT_STOREpublic static final int GRINV_DONT_STOREGraph invariant option to instruct that the graph invariant should not be stored in MoleculeGraph.- See Also:
 
- 
CACHE_REMOVE_GRINVMODULEpublic static final int CACHE_REMOVE_GRINVMODULECache removal option for remove module used in graph invariant calculation.- See Also:
 
- 
CACHE_REMOVE_PARITYMODULEpublic static final int CACHE_REMOVE_PARITYMODULECache removal option for remove module used in parity calculation.- See Also:
 
- 
CACHE_REMOVE_AROMATAMODULEpublic static final int CACHE_REMOVE_AROMATAMODULECache removal option for remove module used in aromatization.- See Also:
 
- 
CACHE_REMOVE_SSSRMODULEpublic static final int CACHE_REMOVE_SSSRMODULECache removal option for remove module used in sssr.- See Also:
 
- 
CACHE_REMOVE_TABSpublic static final int CACHE_REMOVE_TABSCache remove option to clear ctab and btab.- See Also:
 
- 
MIN_RING_SIZE_FOR_TRANS_DBpublic static final int MIN_RING_SIZE_FOR_TRANS_DBThe minimal size of the ring for the existence of TRANS double bond.- See Also:
 
- 
OMIT_POSTCLEANpublic static final int OMIT_POSTCLEANOmit arranging process after the hydrogen addition.- See Also:
 
- 
FRAG_BASICpublic static final int FRAG_BASICBasic fragmentation, only atom - atom connections (bond) are considered.- See Also:
 
- 
FRAG_KEEPING_MULTICENTERSpublic static final int FRAG_KEEPING_MULTICENTERSFragmentation without breaking multicenter S-groups.- See Also:
 
- 
FRAG_KEEPING_SGROUPSpublic static final int FRAG_KEEPING_SGROUPSFragmentation without breaking S-groups.- See Also:
 
- 
FRAG_TYPE_COUNTpublic static final int FRAG_TYPE_COUNTNumber of fragmentation types.- See Also:
 
- 
superGraphParent of all parents.
- 
parentGraphThe structure that contains this molecule graph as a substructure.
- 
theAtomsThe atoms (nodes).
- 
atomCountprotected transient int atomCountThe number of atoms.
- 
theBondsThe bonds (edges).
- 
bondCountprotected transient int bondCountThe number of bonds.
- 
orixprotected transient double orixOrigin x.
- 
oriyprotected transient double oriyOrigin y.
- 
orizprotected transient double orizOrigin z.
- 
grinvCCprotected transient long grinvCCGraph invariant change count. The number of times the molecule (and the corresponding graph invariants) may have changed since the creation of the molecule.- See Also:
 
- 
cacheMemory
- 
ctabprotected transient int[][] ctabConnection table.
- 
btabBond table.
- 
gearchpublic transient chemaxon.struc.gearch.MoleculeGraphGearch gearch
- 
propertyContainer
- 
useOnlyFirstAtomInStereoCalculationprotected transient boolean useOnlyFirstAtomInStereoCalculation
 
- 
- 
Constructor Details- 
MoleculeGraphpublic MoleculeGraph()Construct a 2 dimensional molecule.
 
- 
- 
Method Details- 
getParentGets the parent graph that contains this substructure.- Returns:
- the parent, or null if this is the supergraph
- Since:
- Marvin 2.6
 
- 
getForefatherGets the first parent.- Returns:
- parent of all parents
- Since:
- Marvin 2.9.11
 
- 
getLockGets the lock object for synchronization. The lock object is the top parent.- Returns:
- the lock object
- Since:
- Marvin 2.6
 
- 
addAdds an atom to the molecule.- Parameters:
- atom- the atom object
 
- 
addAdds a bond to the molecule. If the molecule graph is a superGraph, the bond is also added to its endpoints (two MolAtom objects).- Parameters:
- bond- the bond object
 
- 
addAdd a bond to the molecule. If the second parameter is true, there an exception thrown when there is already a bond between the given MolAtoms. There is no checking if either is SgroupAtom. If the molecule graph is a superGraph, the bond is also added to its endpoints (two MolAtom objects).- Parameters:
- bond- the bond object
 
- 
addAtom0Adds an atom.- Parameters:
- atom- the atom reference
 
- 
addAtomWithoutChangingItAdds an atom without setting its parentGraph and index fields.- Parameters:
- atom- the atom reference
- Returns:
- the new atom index
 
- 
addSimpleAtomWithoutChangingItAdds a non-SgroupAtom atom without setting its parentGraph and index fields.- Parameters:
- atom- the atom reference
- Returns:
- the new atom index
 
- 
addAtomToFragmentAdds an atom to a fragment.- Parameters:
- atom- the atom reference
 
- 
addBond0Adds a bond.- Parameters:
- bond- the bond reference
 
- 
addBondWithoutChangingItAdds a bond without setting its parentGraph and index fields.- Parameters:
- bond- the bond reference
- Returns:
- the new bond index
 
- 
packpublic void pack()Reduce memory usage.
- 
removeAtomRemoves an atom and its bonds by reference.- Parameters:
- atom- the atom
- Since:
- Marvin 5.3, 04/30/2009
 
- 
removeAtompublic void removeAtom(int i) Removes an atom and its bonds by index.- Parameters:
- i- the atom index
- Since:
- Marvin 5.3, 04/30/2009
 
- 
removeBondRemoves a bond by reference.- Parameters:
- bond- the bond
- Since:
- Marvin 5.3, 04/30/2009
 
- 
removeBondpublic void removeBond(int i) Removes a bond by index.- Parameters:
- i- the bond index
- Since:
- Marvin 5.3, 04/30/2009
 
- 
removeAllBondspublic void removeAllBonds()Removes all bonds.- Since:
- Marvin 5.3, 04/30/2009
 
- 
removeAllpublic void removeAll()Removes all the atoms and bonds.
- 
getDocumentGets the document object.- Returns:
- a Marvin document object
- Since:
- Marvin 3.3
 
- 
getParentDocumentGets the document or the document of the parent graph. Moved to separate method because R-groups in RgMolecule should not have a normal document parent. If two R-groups would have a common document parent, then their bounds would be determined incorrectly because the graphics objects are common.- Returns:
- the parent document
- Since:
- Marvin 4.1.1, 08/23/2006
 
- 
getDocumentForChildGets the parent document for a child molecule graph.- Parameters:
- g- the child graph or- this
- Returns:
- the parent document
- Since:
- Marvin 4.1.1, 08/23/2006
 
- 
smolDeprecated.UseMoleculeorMoleculeGraphinsteadGets aSmoleculerepresentation of this molecule.- Returns:
- the Smoleculeimplementation
- Since:
- Marvin 5.2.2, 04/24/2009
 
- 
createSmoleculeDeprecated.UseMoleculeorMoleculeGraphinsteadCreates aSmoleculerepresenation of this molecule.- Returns:
- the new Smolecule
- Since:
- Marvin 5.2.2, 04/24/2009
 
- 
setDimpublic void setDim(int d) Sets the dimension. If the molecule is in 0D and set to 2D or 3D then stereo information is removed.- Parameters:
- d- 0, 2, or 3
- See Also:
 
- 
getDimpublic int getDim()Gets the dimension.- Returns:
- 0, 2, or 3
- See Also:
 
- 
getFlagspublic int getFlags()Gets the dimension and chiral flags.- Returns:
- the flags
- Since:
- Marvin 5.0.1, 02/10/2008
 
- 
setFlagsprotected void setFlags(int f) Sets the flags of the molecule.- Parameters:
- f- the flags
- Since:
- Marvin 5.0.1, 02/10/2008
- See Also:
 
- 
isAbsStereopublic boolean isAbsStereo()Gets the absolute stereoconfiguration flag. "Chiral flag" in MDL molfiles.- Returns:
- true for absolute, false for relative configuration
- See Also:
 
- 
setAbsStereopublic void setAbsStereo(boolean c) Sets the absolute stereoconfiguration flag.- Parameters:
- c- the absolute stereoconfiguration flag
- See Also:
 
- 
clearpublic void clear()Clears the molecule. Does the same as clearForImport() but also clears the atoms vector.- See Also:
 
- 
clearForImportClears the bonds vector, the properties, the flags, and sets the origin coordinates to 0. The molecule dimension is set to 2.- Parameters:
- format- input file format, neglected
- See Also:
 
- 
removeAtomRemoves an atom and its bonds with extra clean-up options. This method is for internal use only. UseremoveAtom(MolAtom)instead unless you are sure what you are doing.- Parameters:
- atom- the atom
- cleanupFlags- extra clean-up methods
- Since:
- Marvin 5.3, 04/30/2009
- See Also:
 
- 
removeAtompublic void removeAtom(int i, int cleanupFlags) Removes an atom and its bonds with extra clean-up options. This method is for internal use only. UseremoveAtom(int)instead unless you are sure what you are doing.- Parameters:
- i- the atom index
- cleanupFlags- extra clean-up methods
- Since:
- Marvin 5.3, 04/30/2009
- See Also:
 
- 
setAtom0Sets the atom at the specified index.- Parameters:
- i- atom index
- atom- new atom reference
 
- 
setBondDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph. UseremoveBond(MolBond)for bond removal andadd(MolBond)for adding a new bond to the molecule.Sets the bond at the specified index.- Parameters:
- i- bond index
- b- the bond reference
 
- 
replaceBondDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph. UseremoveBond(MolBond)for removal andadd(MolBond)for adding a new bond to the molecule.Replaces an bond by another one.- Parameters:
- oldb- the old bond
- newb- the new bond
- Since:
- Marvin 5.3, 04/30/2009
 
- 
setAtomSetSeqspublic final void setAtomSetSeqs(int id) Sets the set sequence number of all atoms.- Parameters:
- id- the set sequence number
- Since:
- Marvin 4.0
 
- 
setBondSetSeqspublic final void setBondSetSeqs(int id) Sets the set sequence number of all bonds.- Parameters:
- id- the set sequence number
- Since:
- Marvin 4.0
 
- 
getGrinvpublic int getGrinv(int[] gi) Gets the graph invariants (canonical labels). The graph invariants are copied into the specified array, that must have the same length as the number of atoms in the molecule.Notes: 1. For normal molecules and R-groups, graph invariants are recalculated only if an atom or bond changed, removed or added. 
 2. For selections, graph invariants are recalculated each time this function is called, because atoms and bonds cannot notify selections about their changes.- Parameters:
- gi- output array, its length must be equal to the number of atoms
- Returns:
- the number of different graph invariants
- Throws:
- SecurityException- the GraphInvariants module cannot be loaded because of security reasons (firewall)
 
- 
getGrinv@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public int getGrinv(int[] gi, boolean uniqueFlag) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 4.0, replaced bygetGrinv(int[], int).
 Usage:getGrinv(gi, uniqueFlag ? GRINV_OLDSTEREO : 0);Gets the graph invariants (canonical labels). Same like the former method but if the boolean flag is true, chiral info is also added to invariants (needed for unique SMILES).- Parameters:
- gi- output array, its length must be equal to the number of atoms
- uniqueFlag- boolean flag
- Returns:
- the number of different graph invariants
- Throws:
- SecurityException- the GraphInvariants module cannot be loaded because of security reasons (firewall)
- Since:
- Marvin 3.3
- See Also:
 
- 
getGrinvpublic int getGrinv(int[] gi, int options) Gets the graph invariants (canonical labels). Optionally, chiral info can be added to the invariants and hydrogens can be ignored. Graph invariants are copied into the specified array, that must have the same length as the number of atoms in the molecule.Notes: 1. For normal molecules and R-groups, graph invariants are recalculated only if an atom or bond changed, removed or added. 
 2. For selections, graph invariants are recalculated each time this function is called, because atoms and bonds cannot notify selections about their changes.- Parameters:
- gi- output array, its length must be equal to the number of atoms
- options- graph invariant generation options
- Returns:
- the number of different graph invariants
- Throws:
- SecurityException- the GraphInvariants module cannot be loaded because of security reasons (firewall)
- Since:
- Marvin 4.0 7/08/2005
- See Also:
 
- 
calcDehydrogenizedGrinvpublic int calcDehydrogenizedGrinv(int[] gi) Calculates the graph invariants with the assumption that hydrogens are removed. Entries corresponding to hydrogens are filled with -1 values in the output array. Only normal Hydrogen atoms are removed, isotopes (Deuterium and Tricium) are not.- Parameters:
- gi- output array, its length must be equal to the number of atoms
- Returns:
- the number of different graph invariants
- Throws:
- SecurityException- the GraphInvariants module cannot be loaded because of security reasons (firewall)
- Since:
- Marvin 3.1
- See Also:
 
- 
createDehydrogenizedReadOnlyGraphCreates a dehydrogenized version of the molecule. The same atom and bond objects are used as in the original molecule, so the returned structure must be used for reading only. Hydrogen isotopes (Deuterium and Tricium) are not removed.- Returns:
- dehydrogenized structure
- Since:
- Marvin 3.1
 
- 
getGrinvprotected int[] getGrinv()Gets the graph invariants array. This array is cached, so clone it if you plan to modify it.- Returns:
- the grinv field
- Since:
- Marvin 3.0
- See Also:
 
- 
getGrinvCCpublic final long getGrinvCC()Gets the graph invariant change count. Returns the number of times the graph invariants may have changed since the creation of the molecule.- Returns:
- graph invariant change count
- See Also:
 
- 
setGrinvCCprotected final void setGrinvCC(long g) Sets the graph invariant change count.- Parameters:
- g- graph invariant change count
- Since:
- Marvin 3.4
- See Also:
 
- 
incGrinvCCprotected final void incGrinvCC()Increases the graph invariant change count and sets grinv to null. Incremented in the following cases:- atom, bond addition, removal, property change
- atomic coordinate change
- dimension change
 - Since:
- Marvin 3.5
- See Also:
 
- 
incGrinvCCprotected final void incGrinvCC(boolean isSSSRReset) 
- 
incGrinvCCOnlypublic final void incGrinvCCOnly()Increases the graph invariant change count, but does not change grinv. Handle with care, it may force certain data to be recalculated!- Since:
- Marvin 4.0 5/07/2005
- See Also:
 
- 
resetCtabprotected void resetCtab()An operation performed that changed the connection table and the graph invariants.- Since:
- Marvin 2.6
 
- 
resetGrinvInParentsprotected final void resetGrinvInParents()Graph invariants must be recalculated for this graph and all parent graphs.
- 
regenCtabprotected void regenCtab()Regenerates the connection table. SeegetCtab().- Since:
- Marvin 16.6.6
 
- 
regenBtabprotected void regenBtab()Regenerates the bond table. See.invalid reference#getBtab()- Since:
- Marvin 16.6.6
 
- 
addExplicitHydrogens@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean addExplicitHydrogens(int f) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int).
 Usage:Hydrogenize.convertImplicitHToExplicit(molecule, null, f);Adds explicit H atoms instead of the current implicit ones.- Parameters:
- f- flags specifying special features, otherwise if f is 0, then the result equals with hydrogenize(true).
- Returns:
- true for success, false if an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 4.1.3, 02/11/2006
- See Also:
 
- 
addExplicitHydrogens@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean addExplicitHydrogens(int f, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int).
 Usage:Hydrogenize.convertImplicitHToExplicit(molecule, atoms, f);Adds explicit H atoms instead of the current implicit ones.- Parameters:
- f- flags specifying special features, otherwise if f is 0, then the result equals with hydrogenize(true).
- atoms- add hydrogens to these atoms only
- Returns:
- true for success, false if an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 5.0, 02/23/2007
- See Also:
 
- 
hydrogenize@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean hydrogenize(boolean add) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitHToExplicit(MoleculeGraph)andHydrogenize.convertExplicitHToImplicit(MoleculeGraph).Implicit/explicit Hydrogen conversion. Adds explicit H atoms instead of the current implicit ones, or removes explicit H atoms and increases the number of implicit hydrogens.- Parameters:
- add- add explicit H atoms if true, remove if false
- Returns:
- true for success, false if an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
 
- 
addExplicitLonePairsDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[]).
 Usage:Hydrogenize.convertImplicitLonePairsToExplicit(molecule, null);Adds explicit lone pairs.- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.5, 07/06/2004
 
- 
removeExplicitLonePairs@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void removeExplicitLonePairs()Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitLonePairsToImplicit(MoleculeGraph).Removes explicit lone pairs.- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.5, 07/06/2004
 
- 
implicitizeHydrogens@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public final void implicitizeHydrogens(int f) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, int).
 Usage:Hydrogenize.convertExplicitHToImplicit(molecule, f);Removes explicit bound Hydrogens from the molecule graph and converts them to implicit.- Parameters:
- f- flags specifying special H atom types to include
- Since:
- Marvin 3.1
 
- 
implicitizeHydrogens@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void implicitizeHydrogens(int f, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int).
 Usage:Hydrogenize.convertExplicitHToImplicit(mol, atoms, f);Removes explicit bound Hydrogens from the molecule graph and converts them to implicit.- Parameters:
- f- flags specifying special H atom types to include
- atoms- the subset of H atoms to include or null for all
- Since:
- Marvin 4.1.3, 11/09/2006
 
- 
implicitizeHydrogens@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void implicitizeHydrogens(int f, MolAtom[] atoms, boolean check) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean).
 Usage:Hydrogenize.convertExplicitHToImplicit(mol, atoms, f, check);Removes explicit bound Hydrogens from the molecule graph and converts them to implicit.- Parameters:
- f- flags specifying special H atom types to include
- atoms- the subset of H atoms to include or- nullfor all
- check-- falseif H atoms not belonging to the molecule should be skipped,- trueif such atoms should generate a- RuntimeException
- Since:
- Marvin 5.0, 06/29/2007
 
- 
implicitizeHydrogens0@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) protected boolean implicitizeHydrogens0(int f, MolAtom[] atoms, boolean check) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byHydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean).
 Usage:Hydrogenize.convertExplicitHToImplicit(mol, atoms, f, check);- Returns:
- true if success else false
 
- 
fuseAdds atoms and bonds of another molecule to this one. If the other molecule is in 2D and this molecule in 0D then stereo information is removed from this molecule.- Parameters:
- graph- the other molecule graph
- check-- trueif a containment check should be performed to ensure that only those atoms and bonds are added that are not already elements -- falseif the molecule is known to be disjoint from this one and this check can be safely skipped
- Since:
- Marvin 5.0
 
- 
fuseAdds those atoms and bonds of another molecule to this one that are not already elements. Made final in Marvin 5.0. From Marvin 5.0, subclasses should implementfuse(chemaxon.struc.MoleculeGraph, boolean)instead.- Parameters:
- graph- the other molecule graph
 
- 
fuse0Adds the atoms and bonds of another molecule to this one.- Parameters:
- g- the other molecule
- check-- trueif a containment check should be performed to ensure that only those atoms and bonds are added that are not already elements -- falseif the molecule is known to be disjoint from this one and this check can be safely skipped
- Since:
- Marvin 5.0
 
- 
checkConsistencyDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, no replacement.
 Not intended for public use, it was intended only for internal debugging.Checks the internal consistency of the structure. Use this method for debugging.- Throws:
- RuntimeException- if inconsistency found
- Since:
- Marvin 5.0, 11/06/2007
 
- 
checkBondConsistencyprotected void checkBondConsistency()
- 
updateDimUpdates the dimensions when fusing two structures.- Parameters:
- m- the other molecule
- Since:
- Marvin 4.0.2, 08/26/2005
 
- 
mergeAtoms@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void mergeAtoms(MolAtom replacementAtom, MolAtom origAtom) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.2, useMergeUtil.mergeAtoms(MolAtom, MolAtom, boolean)instead.Merges the bonds of an atom with another atom, then adds the atom to the molecule.- Parameters:
- replacementAtom- the atom which will take place in the molecule after the merge
- origAtom- the original atom which's bonds will be added to the new atom
 
- 
hasValenceErrorpublic boolean hasValenceError()Determines if this molecule has a valence error on any of its atoms.- Returns:
- trueif there is an atom with valence error,- falseif there is no valence error
- Since:
- Marvin 4.1
- See Also:
 
- 
valenceCheckpublic void valenceCheck()Check valence and query property errors for atoms. During this check implicit hydrogens are calculated and the valence error flag is set in case of error. It can be set by a previous call ofsetValenceCheckOptions(ValenceCheckOptions); which atoms are checked.- See Also:
 
- 
valenceCheckCheck valence and query property errors. Check all the atoms if the argument isnull. During this check implicit hydrogens are calculated and the valence error flag is set in case of error.- Parameters:
- v- contains the atoms to check
- See Also:
 
- 
qpropCheckCheck for query property errors. Check all the atoms if the argument isnull.- Parameters:
- v- contains the atoms to check
- See Also:
 
- 
isSimilarToTests if the molecule graph is similar to another graph. Two graphs are similar if:- they have the same number of atoms and bonds,
- for each atom ai in the first graph, there is a corresponding atom aj in the other graph, with the same graph invariant, "equal properties" and "similar bonds".
 - Parameters:
- g- the molecule graph
- Returns:
- trueif the graphs are similar,- falseotherwise
- Since:
- Marvin 3.4.1, 07/21/2004
- See Also:
 
- 
isAtomDeprecated.As of Marvin 14.7.7, no replacement.
 Not supported feature.Determines whether the structure represents only one atom and an arbitrary number of bonds. Note: a one-atom structure has bonds only if it is a fragment.- Returns:
- true if the number of atoms is one
 
- 
isBondDeprecated.As of Marvin 14.7.7, no replacement.
 Not supported feature.Determines whether the structure represents only one bond and zero or two Carbon orMolAtom.EMPTYatoms.- Returns:
- trueif the structure is the representation of a bond
 
- 
isRingDeprecated.As of Marvin 14.7.7, no replacement.
 Not supported feature.Tests whether the molecule graph represents a ring.- Returns:
- trueif the graph is a ring, false otherwise
- Since:
- Marvin 4.1, 01/27/2006
 
- 
isSymmetricpublic boolean isSymmetric()Tests whether the molecule graph is symmetric. The graph is symmetric if each atom has the same graph invariant value.- Returns:
- true if the graph is a symmetric, false otherwise
- Since:
- Marvin 4.1, 01/27/2006
 
- 
getNameGets the molecule title/name. It returns an empty string in this basic implementation.- Returns:
- empty string
- Since:
- Marvin 4.1, 05/28/2006
 
- 
propertiesGets the property container.- Returns:
- the property container
- Since:
- Marvin 4.1, 05/28/2006
 
- 
revalidateCoordDependentPropspublic void revalidateCoordDependentProps()Revalidate coordinate dependent properties. This method should be called at molecule import, after all atomic coordinates and bonds are parsed.- Since:
- Marvin 4.1, 08/03/2006
 
- 
getAtomCountpublic int getAtomCount()Gets the number of atoms.- Returns:
- the number of atoms
 
- 
getAtomCountpublic int getAtomCount(int atomicNumber) Gets the number of atoms with the given atomic number. When atomicNumber is 1, sum includes only explicit Hydrogen atoms (but also D and T isotopes).- Parameters:
- atomicNumber- atomic number of atoms looked for
- Returns:
- number of atoms with the given atomic number
- Since:
- Marvin 5.5, 27/01/2011
 
- 
getBondCountpublic int getBondCount()Gets the number of bonds.- Returns:
- number of bonds
 
- 
getFormalChargepublic int getFormalCharge()Gets the (total) formal charge of the molecule.- Returns:
- the formal charge of the molecule
- Since:
- Marvin 5.1.3
 
- 
getTotalChargepublic int getTotalCharge()Gets the total (formal) charge of the molecule. Does the same as thegetFormalCharge()method.- Returns:
- the total charge of the molecule
- Since:
- Marvin 4.1.10
 
- 
isRealAtomParentprotected boolean isRealAtomParent()Can it be a real atom parent?- Returns:
- true
- Since:
- Marvin 3.0
 
- 
getAtomGets the nth atom.- Parameters:
- n- the atom index
- Returns:
- the atom object
 
- 
getBondGets the nth bond.- Parameters:
- n- the bond index
- Returns:
- the bond object
 
- 
setAtomDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph. UseremoveAtom(int)for atom removal andadd(MolAtom)for adding new atoms.Sets the atom at the specified index.- Parameters:
- i- atom index
- atom- new atom reference
- Since:
- Marvin 5.3, 04/30/2009
 
- 
insertAtomDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph. Similar functionality is performed byadd(MolAtom).Inserts the atom at the specified index.- Parameters:
- i- atom index
- atom- new atom reference
- Since:
- Marvin 5.3, 04/30/2009
 
- 
insertNullAtomsprotected void insertNullAtoms(int i, int count) Insert nulls into the atom array.- Parameters:
- i- starting index
- count- number of new entries
- Since:
- Marvin 5.3, 04/30/2009
 
- 
insertBondDeprecated.as of Marvin 6.2, may construct inconsistentMoleculeGraph. Similar functionality is performed byadd(MolBond).Inserts the bond at the specified index.- Parameters:
- i- bond index
- bond- new bond reference
- Since:
- Marvin 5.3, 04/30/2009
 
- 
insertBondInOrderInsert a bond in the order specified as the second argument.- Parameters:
- e- the bond to insert
- order- array of bonds defining the order
- Since:
- Marvin 5.3, 04/30/2009
 
- 
insertNullBondsprotected void insertNullBonds(int i, int count) Insert nulls into the bond array.- Parameters:
- i- starting index
- count- number of new entries
- Since:
- Marvin 5.3, 04/30/2009
 
- 
sortBondsAccordingToSorts bonds in the same order as they appear in another chemical graph.- Parameters:
- order- the bonds in the other chemical graph
- Since:
- Marvin 5.3, 04/30/2009
 
- 
getAtomArrayCreates an array of atoms.- Returns:
- array of atom objects
- Since:
- Marvin 2.6
 
- 
getBondArrayCreates an array of bonds.- Returns:
- array of bond objects
- Since:
- Marvin 3.5, 09/02/2004
 
- 
calcCenterCalculates the geometrical center.- Parameters:
- p- reference to the object that will hold the result
- Since:
- Marvin 2.7
 
- 
calcOutRectCalculates the outer rectangle.- Returns:
- the outer rectangle (x, y, and z direction width of the outer rectangle)
- Since:
- Marvin 4.1
 
- 
calcOutRectCalculates the outer rectangle.- Parameters:
- p- reference to the object that will hold the result (x, y, and z direction width of the outer rectangle)
- Since:
- Marvin 4.1
 
- 
calcOutRectCenterCalculates the center of the outer rectangle.- Returns:
- the center
- Since:
- Marvin 4.1
 
- 
calcOutRectCenterCalculates the center of the outer rectangle.- Parameters:
- p- reference to the object that will hold the result
 
- 
calcCenterCalculates the geometrical center.- Returns:
- center point
 
- 
calcWidthpublic double calcWidth()Calculates the molecule width.- Returns:
- the molecule width
- Since:
- Marvin 3.0
 
- 
calcHeightpublic double calcHeight()Calculates the molecule height.- Returns:
- the molecule height
- Since:
- Marvin 3.0
 
- 
getDesiredLength@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public double getDesiredLength(int atno1, int atno2, int type) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.11, replaced byMolBond.desiredLength(int, int, int, int)andgetDim().
 Usage:MolBond.desiredLength(atno1, atno2, type, getDim());Gets the ideal bond length in Angstroms.- Parameters:
- atno1- atomic number of first molecule
- atno2- atomic number of second molecule
- type- bond type
- Returns:
- the ideal bond length
 
- 
getDesiredLength@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public double getDesiredLength(MolBond b) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.11, replaced byMolBond.desiredLength(int, int, int, int),MolBond.getType()andgetDim().
 Usage:MolBond.desiredLength(atno1, atno2, b.getType, getDim());Gets the ideal bond length in Angstroms.- Parameters:
- b- the bond
- Returns:
- the ideal bond length
- Since:
- Marvin 2.7
 
- 
bondlengthpublic double bondlength()Calculates the regular bond length.- Returns:
- the calculated length in Angstroms, or MolBond.CCLENGTH if the molecule has no bonds
 
- 
getLocationGets the origin of the molecule.- Returns:
- the origin
- Since:
- Marvin 2.7
- See Also:
 
- 
setLocationSet the origin of the molecule.- Parameters:
- o- the origin
- Since:
- Marvin 2.7
- See Also:
 
- 
moveToMove the molecule.- Parameters:
- o- the new origin
- Since:
- Marvin 2.7
- See Also:
 
- 
transformApply a transformation matrix to the atomic coordinates.- Specified by:
- transformin interface- MTransformable
- Parameters:
- t- the transformation matrix
- Since:
- Marvin 2.7
 
- 
transformApply a transformation matrix to the atomic coordinates.- Parameters:
- t- the transformation matrix
- incg- graph invariants are changed (true) or not (false)
- Since:
- Marvin 3.0
 
- 
getPointsGets an array containing the atom coordinates.- Returns:
- atom coordinates array
- Since:
- Marvin 2.9.1
 
- 
getEnclosingCubeGets the cube that encloses the atoms of molecule graph.- Returns:
- Array of the two corners of the cube: bottom left and top right
- Since:
- Marvin 5.3.2
 
- 
clonecopyMake another molecule identical to this one.- Parameters:
- m- the target molecule
 
- 
clonecopyCopies the specified atoms of this molecule graph to another one.- Parameters:
- iatoms- array of atom indices to copy or- null
- g- the target molecule graph
- Since:
- Marvin 5.0.2, 03/11/2008
 
- 
clonecopyMoleculeGraphWithoutSgroupsprotected boolean clonecopyMoleculeGraphWithoutSgroups(int[] cnodes, MolBond[] cedges, int nb, MoleculeGraph graph) Copies the specified atoms and bonds of this molecule graph to another one.- Parameters:
- cnodes- array of atom indices to copy or- null
- cedges- array of bonds to copy or- nullto copy bonds in cnodes only
- nb- number of bonds
- graph- the target molecule graph
- Returns:
- falseif the atoms array contains all bond end points,- trueif there is at least one external bond
- Since:
- Marvin 5.0.2, 03/07/2008
 
- 
cloneAtomsCopies the specified atoms.- Parameters:
- cnodes- array of atom indices to copy or- null
- graph- the target molecule graph
- Returns:
- the atom count
- Since:
- Marvin 6.0, 2013.02.25.
 
- 
getBondsReturns the bonds attached to the given atom in this molecule graph. By default, returns the bond array stored in the atom.- Parameters:
- atom- the atom
- Returns:
- the bonds attached to the given atom in this molecule graph
- Since:
- Marvin 5.5
 
- 
findInArrayFinds an object in an array.- Parameters:
- array- the array
- indices- array indices or- null
- n- the number of elements
- Returns:
- the object index or -1 if not found
- Since:
- Marvin 5.0.2, 03/07/2008
 
- 
clonelesscopyDeprecated.as of Marvin 6.3.
 Not supported feature.Copy to selection. Copies without cloning. Make another molecule identical to this one, but do not clone atoms, bonds, and the properties.- Parameters:
- graph- the target molecule graph (the selection)
 
- 
hasSelfReferringPropertypublic final boolean hasSelfReferringProperty()Tests whether the property list contains the molecule.- Returns:
- trueif the property list contains the molecule,- falseotherwise
- Since:
- Marvin 4.1.6, 02/11/2007
 
- 
isSelfReferenceTests whether the specified property is a self reference to the molecule.- Parameters:
- p- the property
- Since:
- Marvin 4.1.6, 02/11/2007
 
- 
fixSelfReferringPropertyFix a property containing reference to the molecule. Called from clonelesscopy().- Parameters:
- prop- the property
- Since:
- Marvin 4.1.6, 02/14/2007
- See Also:
 
- 
toStringOverrides MoleculeGraph.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. If the graph is not empty and it has more than one atom, then the string also contains the number of atoms and bonds in "[Na,Mb]" form. If there is only one atom, then its symbol appears between the square brackets.
- 
cloneMake an identical copy of the molecule. The clone is deep clone including atom and bond cloning.
- 
getParityTypepublic int getParityType(int idx) Gets parity type. Currently tetrahedral and allene type parity supported. Only basic parity conditions are checked so return value not 0 does not mean that the atom has parity value different from 0.- Parameters:
- idx- the index of the atom whose parity type is to be determined
- Returns:
- PARITY_ALLENE type for atoms having two double bond, and PARITY_TETRAHEDRAL for atoms having 3 or 4 bonds, else 0.
- See Also:
 
- 
getParitypublic int getParity(int i) Computes the parity of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. Leaves the imported parity unchanged.
 Parity for tetrahedral center is defined as follows:
 Number the atoms surrounding the stereo center with 1, 2, 3, and 4 in order of increasing atom number (position in the atom block) (a hydrogen atom should be considered the highest numbered atom, in this case atom 4). View the center from a position such that the bond connecting the highest-numbered atom (4) projects behind the plane formed by atoms 1, 2, and 3. Sighting towards atom number 4 through the plane (123), you see that the three remaining atoms can be arranged in either a clockwise or counterclockwise direction in ascending numerical order. Parity value of ODD is for a clockwise arrangement at the stereo center and EVEN for counterclockwise.
 Allene like parity is defined as follows:
 The two pair of atoms which connects to the central atom through one single and odd number of double bond connections defines a tetrahedron. Number the tetrahedron atoms with 1, 2, 3, and 4 in order of increasing atom number (position in the atom block). Hydrogen atom should be considered the highest numbered atom, in this case atom 4. We may have two Hydrogen atoms for allene like parity type. So the two Hydrogen atoms are differentiated by the atom indexes connected to the central atom with double bond. The Hydrogen atom which is on the same side of the double bond connecting to the central atom with higher atom index's ligand gets the smaller value (3). View the center from a position such that the bond connecting the highest-numbered atom (4) projects behind the plane formed by atoms 1, 2, and 3. Sighting towards atom number 4 through the plane (123), you see that the three remaining atoms can be arranged in either a clockwise or counterclockwise direction in ascending numerical order. Parity value ODD is assigned for a clockwise arrangement at the stereo center and EVEN for counterclockwise.- Parameters:
- i- the index of the atom whose parity is to be determined
- Returns:
- 0 for nonchiral, PARITY_ODD or PARITY_EVEN for atoms of odd or even parity, PARITY_ODD|PARITY_EVEN for atoms whose parity is unspecified or cannot be assigned -as they are defined in MolAtom
- Throws:
- SecurityException- the Parity module cannot be loaded because of security reasons (firewall)
- See Also:
 
- 
getLocalParitypublic int getLocalParity(int i) Computes the local parity of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. The molecule symmetry is not checked, so even an atom with same ligands can have parity. Leaves the imported parity unchanged. Contracted sgroups must be expanded to achieve consistent result.- Parameters:
- i- the index of the atom whose parity is to be determined
- Returns:
- PARITY_ODD or PARITY_EVEN for atoms of odd or even parity, PARITY_EITHER for atoms with wiggly bond 0 for atoms whose parity is unspecified or not known. Corresponding PARITY_UNSPEC flag is also returned if set.
- Throws:
- SecurityException- the Parity module cannot be loaded because of security reasons (firewall)
- See Also:
 
- 
setParitypublic boolean setParity(int i, int p) Change the bonds flag (UP/DOWN) connected to the given atom to achieve the specified parity. If all atom parities will be set thensetParity(int[] p)is more efficient.- Parameters:
- i- the index of the atom whose parity is to be set
- p- parity to be set (PARITY_ODD,PARITY_EVEN)
- Returns:
- true if successful
- Throws:
- SecurityException- the Parity module cannot be loaded because of security reasons (firewall)
- See Also:
 
- 
setParitypublic boolean setParity(int[] p) Change the bonds flag (UP/DOWN) connected to the whole molecule to achieve the specified parity array. Take care of expanding the molecule if necessary. In 2D, use actual wedge setup and change it if necessary.- Parameters:
- p- the parity for each atom in the molecule
- Returns:
- true if successful
- See Also:
 
- 
setParitypublic boolean setParity(int[] p, boolean useActualWedges) Change the bonds flag (UP/DOWN) connected to the whole molecule to achieve the specified parity array. Take care of expanding the molecule if necessary.- Parameters:
- p- the parity for each atom in the molecule
- useActualWedges- if true use actual wedge setup and change it if necessary, otherwise remove the wedges and set them again
- Returns:
- true if successful
- Since:
- Marvin 3.5, 12/18/2004
- See Also:
 
- 
setLocalParitypublic boolean setLocalParity(int[] p, boolean useActualWedges) In case of 2D molecule change the bonds flag (UP/DOWN), in case of 0D molecule set the atom flags to achieve the specified parity array. Parity setting is allowed for non-stereogenic center. (This means that the central carbon of an isobutane can get parity value.) The molecule is not expanded. Parity calculation use only the narrow end of a wedge in case of 2D molecules (useOnlyFirstAtomInStereoCalculation = true). If useOnlyFirstAtomInStereoCalculation is false then the function returns false.- Parameters:
- p- the parity for each atom in the molecule
- useActualWedges- if true use actual wedge setup and change it if necessary, otherwise remove the wedges and set them again
- Returns:
- true if successful
- Since:
- Marvin 5.0.1, 01/18/2008
- See Also:
 
- 
setLocalParitypublic boolean setLocalParity(int[] idxes, int[] p, boolean useActualWedges) Set given local parity for the given atomic indexes. In case of 2D molecule change the bonds flag (UP/DOWN), in case of 0D molecule set the atom flags to achieve the specified parity array. Parity setting is allowed for non-stereogenic center. (This means that the central carbon of an isobutane can get parity value.) The molecule is not expanded. Parity calculation use only the narrow end of a wedge in case of 2D molecules (useOnlyFirstAtomInStereoCalculation = true). If useOnlyFirstAtomInStereoCalculation is false then the function returns false.- Parameters:
- idxes- atom indexes to set the local parity for
- p- the corresponding local parity information
- useActualWedges- if true use actual wedge setup and change it if necessary, otherwise remove the wedges and set them again
- Returns:
- true if successful
- Since:
- Marvin 5.3.6, 06/30/2010
- See Also:
 
- 
getChiralitypublic int getChirality(int i) Computes the chirality of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. Leaves the imported configuration unchanged. Contracted sgroups are expanded for calculation purposes. Though this method works only for valid atom indices.- Parameters:
- i- the index of the atom whose chirality is to be determined
- Returns:
- 0 for nonchiral, CHIRALITY_R, CHIRALITY_S, CHIRALITY_r, CHIRALITY_s, CHIRALITY_M, CHIRALITY_P for atoms of R, S or r, s or M, P configuration, PARITY_EITHER for atoms whose configuration is unspecified or cannot be assigned -as they are defined in MolAtom
- Throws:
- SecurityException- the Parity module cannot be loaded because of security reasons (firewall)
- See Also:
 
- 
setChiralitySets the chiralities of atoms. Using this method, R, S, r, s chirality values can be set. UseStereoConstants.CHIRALITY_R,StereoConstants.CHIRALITY_S,StereoConstants.CHIRALITY_r, andStereoConstants.CHIRALITY_sto define chirality. If chirality settings on at least on atom was not successful, chirality values on all atoms are reverted back to their original state.- Parameters:
- chiralities- Map of integers, where the key is the atom index, value is the chirality value.
- Returns:
- true, if setting chirality on all atom was successful; false otherwise.
- Since:
- version 14.7.7.
 
- 
setChiralitypublic boolean setChirality(int i, int c) Set chirality of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. Take care of expanding the molecule if necessary.
 Possible chirality values to set:- CHIRALITY_R
- set the stereocenter to R chirality value
- CHIRALITY_S
- set the stereocenter to S chirality value
- CHIRALITY_R|CHIRALITY_S, PARITY_EITHER or 0
- remove chirality value
 - Parameters:
- i- the index of the atom whose chirality is to be set
- c- chirality to be set (CHIRALITY_R,CHIRALITY_S. 0 or (CHIRALITY_R|CHIRALITY_S) to remove chirality)
- Returns:
- true if successful
- Throws:
- SecurityException- the Parity module cannot be loaded because of security reasons (firewall)
- See Also:
 
- 
getStereo2public int getStereo2(int i1, int i2, int i3, int i4) Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D. Not checking atom equivalences using graph invariants. Not checking if the bond is in small ring (MIN_RING_SIZE_FOR_TRANS_DB(so chemically the double bond with its ring ligand can be cis only), but due to the perspective depiction in two dimension the double bond ligand arrangement looks trans. In this case the chemically incorrect trans returned.See getStereo2(chemaxon.struc.MolAtom, int, int, chemaxon.struc.MolAtom)for detailed examples.- Parameters:
- i1- index of atom A1
- i2- index of atom A2
- i3- index of atom A3
- i4- index of atom A4
- Returns:
- the cis/trans information, or 0 if A2 and A3 are not connected
- See Also:
 
- 
getStereo2Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D. Not checking atom equivalences using graph invariants. Not checking if the bond is in small ring (MIN_RING_SIZE_FOR_TRANS_DB(so chemically the double bond with its ring ligand can be cis only), but due to the perspective depiction in two dimension the double bond ligand arrangement looks trans. In this case the chemically incorrect trans returned.- Parameters:
- a1- atom A1
- i2- index of atom A2
- i3- index of atom A3
- a4- atom A4
- Returns:
- the cis/trans information, or 0 if A2 and A3 are not connected
         Returned values for the four Carbons ("1" means set flag): Dihedral Returned flags Remark CIS TRANS CTUNSPEC SMARTS bonds: C/C=C/C - 1 - C/C=C\C 1 - - CC=CC 1 1 - C/?C=C/C - 1 1 C/?C=C\C 1 - 1 ISIS bonds: C-C=C-C 1 1 - 180 degrees C-C X C-C 1 1 - "Cis" or "Trans" bond C/C="C/T?"=C/C - 1 1 "Not Cis" bond C/C="C/T?"=C\C 1 - 1 "Not trans" bond C-C="C/T?"=C-C 1 1 1 180 degrees 
- See Also:
 
- 
getStereo2Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D. Atoms A2 and A3 are atom1 and atom2 of the specified bond. Both (A2, A3) = (atom1, atom2) and (A2, A3) = (atom2, atom1) works. Not checking atom equivalences using graph invariants. Not checking if the bond is in small ring (MIN_RING_SIZE_FOR_TRANS_DB(so chemically the double bond with its ring ligand can be cis only), but due to the perspective depiction in two dimension the double bond ligand arrangement looks trans. In this case the chemically incorrect trans returned.See getStereo2(chemaxon.struc.MolAtom, int, int, chemaxon.struc.MolAtom)for detailed examples.- Parameters:
- b- the bond
- a1- atom A1
- a4- atom A4
- Returns:
- the stereo flags
- See Also:
 
- 
getStereo2Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D. Atoms A2 and A3 are atom1 and atom2 of the specified bond. Both (A2, A3) = (atom1, atom2) and (A2, A3) = (atom2, atom1) works. If A1 or A4 is null 0 is returned. Not checking if the bond is in small ring (MIN_RING_SIZE_FOR_TRANS_DB(so chemically the double bond with its ring ligand can be cis only), but due to the perspective depiction in two dimension the double bond ligand arrangement looks trans. In this case the chemically incorrect trans returned.See getStereo2(chemaxon.struc.MolAtom, int, int, chemaxon.struc.MolAtom)for detailed examples.- Parameters:
- b- the bond
- a1- atom A1
- a4- atom A4
- grcheck- true if check atom equivalences using graph invariants
- Returns:
- the stereo flags
- See Also:
 
- 
getEZStereoGets E/Z stereo information for the given double bond. The calculation considers the following:- If the bond is in a small ring (sizeinvalid input: '<'8) then EZConfiguration.NONEis returned
- If the molecule is zero dimensional then no calculation is performed but the values stored in the bond's flags are taken into consideration
- The CIP (Cahn-Ingold-Prelog) rules are used to determine the highest priority ligands around the double bond
- No graph invariant checking is performed
 - The highest priority ligands are calculated (using the CIP rules), one ligand connected to each end atom of the double bond
- The CIS/TRANS stereo value is calculated for these two atoms and the double bond's end atoms
- The CIS/TRANS value is converted to E/Z by:
 - CIS configuration is converted to EZConfiguration.Z
- TRANS configuration is converted to EZConfiguration.E
- CIS/TRANS configuration is converted to EZConfiguration.E_OR_Z
- CIS/UNSPEC configuration is converted to EZConfiguration.Z_OR_UNSPEC
- TRANS/UNSPEC configuration is converted to EZConfiguration.E_OR_UNSPEC
- no configuration is converted to EZConfiguration.NONE
 
- CIS configuration is converted to 
 - Parameters:
- bond- the bond for which the E/Z stereo will be calculated
- Returns:
- the E/Z stereo value that is specified by the given bond
- See Also:
 
- If the bond is in a small ring (sizeinvalid input: '<'8) then 
- 
getStereo2Gets cis/trans (Z/E) stereo information for the given bond. Use the CIP rules to determine the A1, A4 atoms in A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D. For ring bonds 0 is returned. Not checking atom equivalences using graph invariants.See getStereo2(chemaxon.struc.MolAtom, int, int, chemaxon.struc.MolAtom)for detailed examples. SeegetEZStereo(MolBond)for a similar method with different return values.- Parameters:
- b- the bond
- Returns:
- CIP stereo values for the given bond: CIS for Z stereo configuration, TRANS for E stereo configuration, CIS|TRANS for E/Z stereo configuration or 0
- See Also:
 
- 
getStereo2Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D. Not checking atom equivalences using graph invariants.See getStereo2(chemaxon.struc.MolAtom, int, int, chemaxon.struc.MolAtom)for detailed examples.- Parameters:
- b- the bond
- a1- atom A1
- i2- index of atom A2
- i3- index of atom A3
- a4- atom A4
- Returns:
- the stereo flags
- See Also:
 
- 
getStereo2Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. Calculates the stereo information if the molecule is 2D or 3D, reports previously set information if it is 0D.See getStereo2(chemaxon.struc.MolAtom, int, int, chemaxon.struc.MolAtom)for detailed examples.- Parameters:
- b- the bond
- a1- atom A1
- i2- index of atom A2
- i3- index of atom A3
- a4- atom A4
- grcheck- true if check atom equivalences using graph invariants
- Returns:
- the stereo flags
- See Also:
 
- 
removeBondRemoves a bond by reference.- Parameters:
- bond- the bond
- cleanupFlags- extra clean-up methods
- Since:
- Marvin 3.1
- See Also:
 
- 
removeBondprotected void removeBond(int i, int cleanupFlags) Removes a bond by index.- Parameters:
- i- the bond index
- cleanupFlags- extra clean-up methods
- Since:
- Marvin 3.1
- See Also:
 
- 
regenBondspublic void regenBonds()Regenerates the bond vector: remove its elements, then put the bond objects from the atoms into it.
- 
isolateIsolates atom: a more efficient way of removing an atom thanremoveAtom(chemaxon.struc.MolAtom), especially for large molecule graphs. Removes the atom but instead of shifting the atoms array, simply sets the corresponding entry tonull. After isolating some atoms, callremoveIsolatedAtoms()to get a valid molecule graph.- Parameters:
- node- the atom
- Since:
- Marvin 5.0
 
- 
isolateIsolates bond: a more efficient way of removing a bond thanremoveBond(chemaxon.struc.MolBond), especially for large molecule graphs. Removes the bond but instead of shifting the bonds array, simply sets the corresponding entry tonull. After isolating some bonds, callremoveIsolatedBonds()to get a valid molecule graph.- Parameters:
- edge- the bond
- Since:
- Marvin 5.0
 
- 
removeIsolatedAtomsprotected void removeIsolatedAtoms()Removes thenullatom entries in the atoms array and sets the index fields appropriately. Clean-up method after callingisolate(chemaxon.struc.MolAtom)for some atoms.- Since:
- Marvin 5.0
 
- 
removeIsolatedBondsprotected void removeIsolatedBonds()Removes thenullbond entries in the bonds array and sets the index fields appropriately. Clean-up method after callingisolate(chemaxon.struc.MolBond)for some bonds.- Since:
- Marvin 5.0
 
- 
canBeCTpublic boolean canBeCT(int i2, int i3) Determines whether the bond between the specified atoms can be a CIS/TRANS or not. In case of ring bonds the ring sizes of the ring for the existence of CIS/TRANS specific bond should be checked before calling this method as ring sizes are not checked in this method.- Parameters:
- i2- index of the first atom
- i3- index of the second atom
- Returns:
- true if this is a double bond that can be either CIS, TRANS or EITHER, false otherwise.
 
- 
canBeCTpublic boolean canBeCT(int i2, int i3, boolean grcheck) Determines whether the bond between the specified atoms can be a CIS/TRANS or not. In case of ring bonds the ring sizes of the ring for the existence of CIS/TRANS specific bond should be checked before calling this method as ring sizes are not checked in this method.- Parameters:
- i2- index of the first atom
- i3- index of the second atom
- grcheck- true if check atom equivalences using graph invariants
- Returns:
- true if this is a double bond that can be either CIS, TRANS or EITHER, false otherwise.
- Since:
- Marvin 4.0 1/23/2005
 
- 
canBeCTDetermines whether the given bond can be a CIS/TRANS or not. In case of ring bonds the ring sizes of the ring for the existence of CIS/TRANS specific bond should be checked before calling this method as ring sizes are not checked in this method.- Parameters:
- bond- the bond to check
- Returns:
- true if this is a double bond that can be either CIS, TRANS or EITHER, false otherwise.
- Since:
- Marvin 5.5
 
- 
getLonePairCountDeprecated.useMolAtom.getLonePairCount()insteadGets the number of lone pair atoms.- Parameters:
- i- atom index
- Returns:
- the number of lone pair atoms connected to this atoms
- Since:
- Marvin 3.5, 09/29/2004
 
- 
getExplicitLonePairCountDeprecated.For internal use only.Gets the explicit lone pair count of the submitted atom.- Parameters:
- i- atom index
- Returns:
- the number of the explicit lone pairs
- Since:
- Marvin 4.1.2, 10/06/2005
 
- 
aromatizeAromatize (using the default general aromatization method) or dearomatize molecule.- Parameters:
- a- aromatize (true) or dearomatize (false)
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 2.8
- See Also:
 
- 
aromatizepublic final void aromatize()Aromatize molecule using the default general aromatization method. Only single or double bonds are changed to aromatic, aromatic bonds are not changed.- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.4, 05/10/2004
- See Also:
 
- 
dearomatizepublic boolean dearomatize()Dearomatize molecule.- Returns:
- true if success, else false.
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 5.0.1, 01/05/2008
 
- 
dearomatizepublic boolean dearomatize(int method) Dearomatize molecule.- Parameters:
- method- Specifies the algorithm for dearomatization. Possible values:- DEAROM_GENERAL - General dearomatization
- DEAROM_HUCKELCHECK - Check Huckel rule during dearomatization.
- DEAROM_HUCKELCHECK_EX - The same as DEAROM_HUCKELCHECK but throw exception if dearomatization is not successful.
 
- Returns:
- true if success, else false.
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- RuntimeException- the molecule cannot be dearomatized with method DEAROM_HUCKELCHECK_EX
- Since:
- Marvin 5.2.3, 06/29/2008
 
- 
aromatizepublic void aromatize(int method) Aromatizes molecule. Only single or double bonds are changed to aromatic, aromatic bonds are not changed. For query molecules if the molecule contains ANY bond, then the aromaticity is checked as if the ANY bonds were aromatic bonds. If a ring or a ring system found to be aromatic then the single bonds are changed to SINGLE_OR_AROMATIC and the double bonds to DOUBLE_OR_AROMATIC type.- Parameters:
- method- Specifies the algorithm for aromatization. Possible values:- AROM_BASIC - Basic aromatization
- AROM_GENERAL - General (Daylight compatible) aromatization
- AROM_LOOSE - Loose aromatization
 
 - AROM_BASIC: only up to 18 membered rings are checked
- AROM_GENERAL: no ring system limit
 
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.4
- See Also:
 
- 
aromatizepublic void aromatize(int method, boolean checkAmbiguity) Aromatizes molecule. Only single or double bonds are changed to aromatic, aromatic bonds are not changed. For query molecules if checkAmbiguity set to true and the molecule contains ANY bond, then the aromaticity is checked as if the ANY bonds were aromatic bonds. If a ring or a ring system found to be aromatic then the single bonds are changed to SINGLE_OR_AROMATIC and the double bonds to DOUBLE_OR_AROMATIC type. Otherwise if checkAmbiguity is set to false a bond containing ANY bond cannot be aromatic.- Parameters:
- method- Specifies the algorithm for aromatization. Possible values:- AROM_BASIC - Basic aromatization
- AROM_GENERAL - General (Daylight compatible) aromatization
- AROM_LOOSE - Loose aromatization
 
 - AROM_BASIC: only up to 18 membered rings are checked
- AROM_GENERAL: no ring system limit
 
- checkAmbiguity- Specifies whether ANY bonds should be considered during aromatization.
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.4
- See Also:
 
- 
calcHybridizationpublic void calcHybridization()Calculates and sets hybridazation state for each atom. The calculation is based on simple rules that cannot be customized in the present implementation. However,setHybridizationState( int )can be called to set the appropriate value directly. This sp-hybridization state reflects the spatial configuration of the C,N and O atoms rather than the sp-hybridization of the electron bands. It doesn't cover all the mixed orbitals of Si,S and P atoms.For hydrogens the "s" MolAtom.HS_Sstate, for atoms with query bonds the unknown stateMolAtom.HS_UNKNOWNis set. If the atom has aromatic bonds the sp2 state is set. Otherwise the sp-hybridization state is determined based on the number of double and tripple bonds. If the atom has a tripple bond or two double bonds the sp state is set. If the atom has one double bond the sp2 state is set. If the atom has more then one tripple bond or more than two double bonds the unknown state is set. If a heavy atom has only single bonds the sp3 state is set.- Since:
- Marvin 3.5
- See Also:
 
- 
getFormulaGets the molecular formula.- Returns:
- the formula
 
- 
getMasspublic double getMass()Calculates the molecular weight of the molecule. Returns adoublevalue.- Returns:
- the molecular weight
 
- 
getExactMasspublic double getExactMass()Calculates the molecular weight of the molecule using the mass of the most frequent natural isotope of the atoms. Returns adoublevalue.- Returns:
- the molecular exact weight
 
- 
makeItSimilarCopies some properties of this molecule to the other one specified as argument. Copies the flags and the origin coordinates.- Parameters:
- g- the molecule to change
 
- 
newInstanceCreates a new MoleculeGraph object. The dimension and the origin coordinates will be the same as in the original molecule.- Returns:
- a MoleculeGraph object
 
- 
getGraphUnionGets a molecule graph containing all the atoms and bonds.- Returns:
- this object (in the default implementation)
- Since:
- Marvin 3.0, 11/11/2002
 
- 
indexOfGets the index of the specified atom.- Parameters:
- atom- the atom
- Returns:
- the index, or -1 if not found
- Since:
- Marvin 2.7
 
- 
indexOfGets the index of the specified bond. This method uses MolBond.equals() for the bond comparison.- Parameters:
- bond- the bond
- Returns:
- the index, or -1 if not found
- Since:
- Marvin 2.7
- See Also:
 
- 
findAtomFinds an atom in the atoms array.- Returns:
- the atom index or -1 if not found
 
- 
findBondFinds a bond in the bonds array.- Returns:
- the bond index or -1 if not found
 
- 
containsChecks if the molecule graph contains the specified atom.- Parameters:
- atom- the atom object
- Returns:
- true if the graph contains the object, false otherwise
 
- 
containsChecks if the molecule graph contains the specified bond, or a bond which is equals with the given bond.- Parameters:
- bond- the bond object
- Returns:
- true if the graph contains the object, false otherwise
- See Also:
 
- 
containsDoes the molecule graph contain the specified fragment?- Parameters:
- graph- the fragment
- Returns:
- true if it contains the graph, false if not
 
- 
isEmptypublic boolean isEmpty()Tests whether the molecule graph is empty.- Returns:
- trueif the graph does not contain any atoms or bonds,- falseotherwise
 
- 
getSubGraphsGets all "submolecules".- Since:
- Marvin 4.1.2
- See Also:
 
- 
getSubGraphCountprotected int getSubGraphCount()Gets the number of all "submolecules". Submolecules are R-groups and the root structure in case of anRgMolecule, reactants, products and agents of anRxnMoleculeetc.- Returns:
- the number of submolecules
- Since:
- Marvin 4.1.2
- See Also:
 
- 
getSubGraphsGets all "submolecules".- Parameters:
- m- the output array
- off- offset
- Since:
- Marvin 4.1.2
- See Also:
 
- 
addAtomsAndBondsToAdds all atoms and bonds to the specified molecule.- Parameters:
- s- the selection molecule
- Since:
- Marvin 4.1, 11/25/2005
 
- 
hasExplicitLonePairs@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean hasExplicitLonePairs()Deprecated, for removal: This API element is subject to removal in a future version.useMDocument.hasExplicitLonePairs()insteadTests whether the molecule has explicit lone pair atoms.- Returns:
- true if it has lone pair atoms, false otherwise
- Since:
- 3.5.1, 11/24/2004
 
- 
hasImplicitHpublic boolean hasImplicitH()Tests whether the molecule has implicit hydrogen atoms.- Returns:
- true, if the molecule has at least one implicit hydrogen atom
- Since:
- Marvin 3.3, 01/14/2004
 
- 
hasAtomSetpublic boolean hasAtomSet()Tests whether the molecule graph has atom sets.- Returns:
- trueif there are atom sets,- falseotherwise
- Since:
- Marvin 4.0, 03/02/2005
 
- 
hasBondSetpublic boolean hasBondSet()Tests whether the molecule graph has atom sets.- Returns:
- trueif there are atom sets,- falseotherwise
- Since:
- Marvin 4.0, 03/02/2005
 
- 
hasExtraLabelSetpublic boolean hasExtraLabelSet()
- 
clean@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean clean(int dim, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.clean(MoleculeGraph, int, String).Calculates atom coordinates.- Parameters:
- dim- dimensions
- opts- cleaning options
- Returns:
- true for success, false if an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
 
- 
partialClean@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean partialClean(Molecule[] template, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.partialClean(Molecule, Molecule[], String).Calculates atom coordinates by using the given template molecule array. Works only in 2D. Set the x and y coordinates for the substructure of this molecule which first match a molecule from template molecule array. Partially clean the rest atoms. Remark, that only the first matching template molecule is used despite any later match in the template molecules. If the template has no wedges, try to keep the wedges of the original molecule. Otherwise try to keep the template wedge settings.- Parameters:
- template- template molecule array (substructure of the target)
- opts- cleaning options
- Returns:
- true for success, false if no template match found or an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 5.4, 02/23/2010
 
- 
partialClean@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean partialClean(MoleculeGraph template, int[] map, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.partialClean(MoleculeGraph, MoleculeGraph, int[], String).Calculates atom coordinates by using the given template molecule. Works only in 2D. Set the x and y coordinates of the molecule from the given template using the given mapping. Partially clean the rest atoms. Map length should be equal the atomcount of the template. If the template has no wedges, try to keep the wedges of the original molecule. Otherwise try to keep the template wedge settings.- Parameters:
- template- template molecule (substructure of the target)
- map- hit list which describes the atom mapping (the size equals to the number of atoms in the template, contains target atom indexes or -1 to exclude)
- opts- cleaning options
- Returns:
- true for success, false if an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 5.0, 09/09/2007
 
- 
partialClean@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean partialClean(int dim, int[] fixed, String opts) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.partialClean(MoleculeGraph, int, int[], String).Calculates atom coordinates by using fixed atoms. Internal use only. Works only in 2D. Store the needed stereo information in the atomflags!- Parameters:
- dim- dimensions
- fixed- atom indexes to be fixed
- opts- cleaning options
- Returns:
- true for success, false if an error occurred
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.5.2, 01/01/2005
 
- 
clean@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public boolean clean(int dim, String opts, MProgressMonitor pmon) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleaner.clean(MoleculeGraph, int, String, MProgressMonitor).Calculates atom coordinates. In a 3D it works only for Molecules (not for MoleculeGraphs).- Parameters:
- dim- dimensions
- opts- cleaning options
- pmon- progress monitor or- null
- Returns:
- true for success, false if an error occurred (for example 3D case for MoleculeGraphs).
- Throws:
- SecurityException- cannot load module because of a security problem (firewall)
- Since:
- Marvin 3.4, 05/06/2004
- See Also:
 
- 
stereoCleanpublic boolean stereoClean()Reset the wedges of the molecule, based on the actual parity information in 2D, remove wedges in 3D. Take care of expanding the molecule if necessary. Only rings smaller then 19 atoms are examined.- Returns:
- true if successful
 
- 
isGrinvCCValidprotected boolean isGrinvCCValid()Tests whether the graph invariant change count is valid.- Returns:
- true
- Since:
- Marvin 5.0, 11/30/2007
 
- 
getAromaticAndAliphaticRingspublic int[][][] getAromaticAndAliphaticRings(int aromatizationType, boolean onlyAromrings, boolean aromatize, int maxRingSize, int ringsLimit) Returns the aromatic and or aliphatic ring atom indexes.
 Note: This method does not aromatize the already aromatized rings. Use first thedearomatize()ordearomatize(int)methods to convert the molecule to Kekule form.
 Handle maxRingSize, ringsLimit parameters with care, otherwise the calculation can take extremly long time or result in OutOfMemoryError. Suggested values are 18 for maxRingSize and 1000 for ringsLimit parameter.- Parameters:
- aromatizationType- use aromatization:- 0 - No aromatization. The molecule is used as it is.
- AROM_BASIC - basic aromatization
- AROM_GENERAL - general aromatization
 
- onlyAromrings- get only the aromatic rings (Aromatic ring detection is faster than calculating Aliphatic and Aromatic rings in case of BASIC aromatization, in case of GENERAL aromatization there is no difference in the speed),
- aromatize- whether to set the bonds to aromatic (true), or keep the original form (false),
- maxRingSize- the maximum ring size during ring detection (0: no limit)
- ringsLimit- limit of the number of rings (0: no limit)
- Returns:
- the aromatic ring atom indexes in the array 0th position, the aliphatic ring atom indexes in the array 1st position
- Since:
- Marvin 4.1
- See Also:
 
- 
getSSSRpublic final int[][] getSSSR()Gets the Smallest Set of Smallest Ring atom indexes array. It follows all kind of bonds includingMolBond.ANY,MolBond.COORDINATE,MolBond.HYDROGEN. If the SSSR array is not calculated for the molecule, then creates it. sssr[i][j] is the j-th atom index at the i-th SSSR ring in the molecule. This array is cached, so clone it if you plan to modify it.- Returns:
- the sssr atom index arrays
- Since:
- Marvin 3.0
- See Also:
 
- 
getCSSRpublic final int[][] getCSSR()Gets the Complete Set of Smallest Ring atom indexes array. CSSR is generated by adding the ring to CSSR which are xor of the SSSR but size smaller then 14 and also size not larger then the largest ring in the SSSR. If the CSSR array is not calculated for the molecule, then create it. cssr[i][j] is the j-th atom index at the i-th CSSR ring in the molecule. This array is cached, so clone it if you plan to modify it.- Returns:
- the cssr atom index arrays
- Since:
- Marvin 5.0
- See Also:
 
- 
getSSSRBondspublic final int[][] getSSSRBonds()Gets the Smallest Set of Smallest Ring bond indexes array. Values are recalculated each time from the array of BitSets. The bond indexes are not in connection order. UseTopologyUtil.convertSSSRBondSetsToConnectedBondIndexArray(BitSet[], MoleculeGraph)to get bond indexes with connection order. WARNING! UsinggetSSSRBondsAsBitSet()may be more efficient and requires less memory usage.- Returns:
- the sssr bond index arrays
- Since:
- Marvin 5.1.2
- See Also:
 
- 
getSSSRIdxesForAtomspublic int[][] getSSSRIdxesForAtoms()Get the sssr ring indexes in which the atom (specified with it's index) can be located. This array is cached, so clone it if you plan to modify it.- Returns:
- sssr ring indexes for each atom index.
- Since:
- Marvin 4.1.8 4/17/2007
- See Also:
 
- 
getCSSRIdxesForAtomspublic int[][] getCSSRIdxesForAtoms()Get the cssr ring indexes in which the atom (specified with it's index) can be located.- Returns:
- cssr ring indexes for each atom index.
- Since:
- Marvin 16.11.7.0
- See Also:
 
- 
getSSSRBondSetGet SSSR bond index bitset. Values are not recalculated but the result of a previous calculation returned. If no previous calculation result found the values are calculated.- Returns:
- the SSSR ring bond indexes in bitset.
- Since:
- Marvin 5.10
 
- 
getSSSRBondsAsBitSetGets the Smallest Set of Smallest Ring edges as an array of BitSets, one BitSet for each ring. Values are cached.- Returns:
- the sssr bonds as an array of BitSets, one BitSet for each ring
 
- 
getSSSRBondSetInLongDeprecated.as of 15.09.2014, usegetSSSRBondSet()insteadGet SSSR bond bitsets in long array. To get if the given 'n' bond is in the sssr long array 'r', use the following code:static boolean get(int n, long[] r) { return (r[n/64] & (((long)1) << (63-(n % 64)))) != 0 ;
 }- Returns:
- the SSSR ring bond indexes in long array.
- Since:
- Marvin 4.1
- See Also:
 
- 
getSmallestRingSizeForIdxpublic int[] getSmallestRingSizeForIdx()Get the smallest ring size in which the atom (specified with it's index) can be located. This array is cached, so clone it if you plan to modify it.- Returns:
- smallest ring size for each atom index.
- Since:
- Marvin 4.1 4/13/2006
- See Also:
 
- 
isRingBondpublic boolean isRingBond(int idx) Is this bond in ring?- Parameters:
- idx- the bond index
- Returns:
- true if the bond is in ring else false.
 
- 
getImplicitHcountpublic int getImplicitHcount()Gets the total number of implicit hydrogens attached to the molecule.- Returns:
- the implicit hydrogen count or the number of query hydrogens
 
- 
getExplicitHcountpublic int getExplicitHcount()Gets the total number of explicit hydrogens attached to the molecule.- Returns:
- the explicit hydrogen count
- Since:
- Marvin 3.4
 
- 
findAtomCloneFinds the clone of an atom.- Parameters:
- a- the original atom
- Returns:
- the clone or null if not found
- Since:
- Marvin 3.4.1, 07/06/2004
 
- 
isValidLinkNodepublic boolean isValidLinkNode(int linkAtomIdx, int outer1, int outer2) Checks whether the specified link atom is valid or not. Invalid link atoms are those where repetition is impossible due to rings.- Parameters:
- linkAtomIdx- atom index to be set to link atom.
- outer1- outer bond to be set by setLinkNodeOuterAtom(0)
- outer2- outer bond to be set by setLinkNodeOuterAtom(1)
- Returns:
- whether repetition is possible on the given atom and outer bonds.
- Since:
- Marvin 4.0 12/29/2004
 
- 
setLinkNodeDefaultOutersSets link node outer atoms to default values, if they are not set yet; making sure that the resulting link node configuration is valid.- Parameters:
- atom- Atom to set to link node.
- Throws:
- IllegalArgumentException- if it is an invalid link node configuration.
- Since:
- Marvin 4.0 12/29/2004
- See Also:
 
- 
getVisibleCoordsReturns the coordinates of the given atom (contained in the molecule).- Parameters:
- ma- The atom to be queried.
- Returns:
- The coordinates of ma.
- Since:
- Marvin 4.0 8/07/2005
 
- 
saveCacheSaves caches like connection table, bond table, etc.- Since:
- Marvin 3.4
 
- 
restoreCacheRestores caches like connection table, bond table, etc.- Since:
- Marvin 3.4
 
- 
isMultiChiralpublic boolean isMultiChiral()Returns the multiple chirality flag. To speed up the canonical label calculations, add chirality invariant to only those molecules that has at least two possible chiral centres.- Since:
- Marvin 3.3
 
- 
adjustMultiChiralFlagpublic void adjustMultiChiralFlag()Checks whether the molecule has multiple chiral centres- Since:
- Marvin 3.3
 
- 
isMoleculeDeprecated, for removal: This API element is subject to removal in a future version.as of Marvin 14.7.7, no replacement.
 Usage:use myObject instanceof MoleculeinsteadChecks if the object is an instance of Molecule or not.x.isMolecule()is equivalent tox instanceof Molecule, only faster.- Returns:
- false
- Since:
- Marvin 5.2
 
- 
isQuerypublic boolean isQuery()Indicates if the molecule has query features: query atoms or query bonds.- Returns:
- trueif the molecule has query features
- Since:
- Marvin 4.0 04/02/2005
- See Also:
 
- 
clearCachedInfopublic void clearCachedInfo(int options) Deletes the cached information depending on the given options.- Parameters:
- options- options for the cache clearing
- Since:
- Marvin 4.0.2 09/20/2005
- See Also:
 
- 
arrangeComponentsDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.7, replaced byCleanUtil.arrangeComponents(MoleculeGraph, boolean, boolean).
 Usage:CleanUtil.arrangeComponents(molecule, true, true);Arranges molecule components (fragments, reactants, agents, products, R-group definitions) nicely. Also arranges molecule fragments in root / main molecule, attached data and Sgroup brackets.- Returns:
- trueif coordinates changed,- falseif unchanged
- Since:
- Marvin 4.1
 
- 
setGrinvOptionspublic void setGrinvOptions(int opt) Sets graph invariant calculation options passed to the module.- Parameters:
- opt- the graph invariant calculation option
- Since:
- Marvin 4.1.6
- See Also:
 
- 
getGrinvOptionspublic int getGrinvOptions()Gets graph invariant calculation options passed to the module.- Returns:
- the graph invariant calculation option
- Since:
- Marvin 4.1.6
- See Also:
 
- 
useOnlyFirstAtomInStereoCalculationpublic void useOnlyFirstAtomInStereoCalculation(boolean f) Set how parity module should interpret wedes. The difference between the two ideas wheter to interpret both (narrow and wide) endpoints of the wedge as chiral center or just the first atom (which is the narrow end of the MDL wedge).- Parameters:
- f- wheter to use only the first atom of the wedge for calculations
- Since:
- Marvin 5.0
 
- 
isOnlyFirstAtomInStereoCalculationpublic boolean isOnlyFirstAtomInStereoCalculation()Get how parity module interpret wedges. The difference between the two ideas whether to interpret both (narrow and wide) endpoints of the wedge as chiral center (return false) or just the first atom (which is the narrow end of the MDL wedge) (return true).- Returns:
- true if just the first atom of the bond is considered as chiral center, else false.
- Since:
- Marvin 5.0
 
- 
sumConservedQuantitiesFor internal use only.- Since:
- Marvin 4.1.13, 09/19/2007
- See Also:
 
- 
getCtabpublic int[][] getCtab()Gets the connection table. If there is no connection table for the molecule graph, then creates it. ctab[i][j] will be the index of the j-th neighbor of the i-th atom. This array is cached, so clone it if you plan to modify it.- Returns:
- the ctab array
- Since:
- Marvin 2.6
 
- 
getBondTableGets the bond (edge) table. If there is no bond table for the molecule, then creates it. btab.elementOf(i, j) will be the index of the bond between atoms i and j, or -1 if there is no bond. This array is cached, so clone it if you plan to modify it.- Returns:
- the BondTableof this molecule graph.
- Since:
- Marvin 5.4
 
- 
findFrags@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public <C extends MoleculeGraph> C[] findFrags(Class<C> cl) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.6, replaced byfindFrags(Class, int)andFRAG_KEEPING_MULTICENTERS.
 Usage:mol.findFrags(cl, MoleculeGraph.FRAG_KEEPING_MULTICENTERS);Determines the disconnected fragments and puts them into an array. Multicenter groups are kept in the same fragment. Atoms are removed from the original molecule object unless the fragment class is SelectionMolecule.class.The original atom order is preserved in the returned fragments. Fragment order is also determined by the original atom order. The first fragment is the one containing atom 0, the second fragment is the one containing the smallest indexed atom not in the first fragment, etc. - Type Parameters:
- C- the class of the fragments
- Parameters:
- cl- create fragment objects of this class
- Returns:
- array of fragments
- Since:
- Marvin 3.0
- See Also:
 
- 
findFragsDetermines the disconnected fragments and puts them into an array. Atoms are removed from the original molecule object unless the fragment class is SelectionMolecule.class.The original atom order is preserved in the returned fragments. Fragment order is also determined by the original atom order. The first fragment is the one containing atom 0, the second fragment is the one containing the smallest indexed atom not in the first fragment, etc. Fragmentation is performed depending on fragmentation type: - Merge only fragmented multicenter S-groups (see FRAG_KEEPING_MULTICENTERS)
- Merge all types of S-groups (see FRAG_KEEPING_SGROUPS)
- Keep all fragments separately, do not take into account the S-groups (see FRAG_BASIC)
 - Type Parameters:
- C- the class of the fragments
- Parameters:
- cl- create fragment objects of this class
- fragmentationType- determines the type of fragmentation
- Returns:
- array of fragments
- Since:
- Marvin 5.6
- See Also:
 
- Merge only fragmented multicenter S-groups (see 
- 
findComponentIds@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public final int[] findComponentIds()Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced bygetFragIds(int)andFRAG_BASIC.
 Usage:mol.getFragIds(MoleculeGraph.FRAG_BASIC);Assigns a component ID to each connected component. S-groups are ignored. Do not modify the result array!- Returns:
- the component ID array (the i-th ID is the component ID for atom i)
- Since:
- Marvin 4.0
 
- 
findComponentIdspublic final int[] findComponentIds(int[] inds) Assigns a component ID to each connected component formed by the specified atom indexes. S-groups are ignored. Do not modify the result array!- Parameters:
- inds- atom index array,- nullmeans all atoms
- Returns:
- the corresponding component ID array (the i-th ID is the component ID for atom inds[i]or atomiif the atom index array isnull)
- Since:
- Marvin 4.0
 
- 
getFragCountDeprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.6, replaced bygetFragCount(int)andFRAG_KEEPING_MULTICENTERS.
 Usage:mol.getFragCount(MoleculeGraph.FRAG_KEEPING_MULTICENTERS);Returns the number of fragments for fragmentation keeping multicenters.- Returns:
- the number of fragments
- Since:
- Marvin 3.01
- See Also:
 
- 
getFragCountpublic final int getFragCount(int fragmentationType) Returns the number of fragments for the given fragmentation type.- Parameters:
- fragmentationType- type of fragmentation
- Returns:
- the number of fragments
- Since:
- Marvin 5.6
- See Also:
 
- 
getFragIdspublic final int[] getFragIds(int fragmentationType) Gets an array containing the fragment id for each atom for the given fragmentation type. This array is cached, so clone it if you plan to modify it.- Parameters:
- fragmentationType- type of fragmentation
- Returns:
- array of fragment identifiers
- Since:
- Marvin 5.6
- See Also:
 
- 
regenGearchprotected final void regenGearch()Recreate graph search results object.
- 
findFrag@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public final void findFrag(int i, MoleculeGraph frag) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 5.6, replaced byfindFrag(int, int, MoleculeGraph)andFRAG_KEEPING_MULTICENTERS.
 Usage:mol.findFrag(i, MoleculeGraph.FRAG_KEEPING_MULTICENTERS, frag);Determines the subgraph connected to the specified atom, considering multicenter S-groups as one fragment. Subsequent calls with different atom (i) argument are possible because only those atoms and bonds are added that are still not elements of frag. Atoms are removed from the original molecule graph unless the frag is a SelectionMolecule.- Parameters:
- i- atom index
- frag- add the atoms and bonds to this MoleculeGraph
- Since:
- Marvin 2.6
- See Also:
 
- 
findFragDetermines the subgraph connected to the specified atom. Subsequent calls with different atom (i) argument are possible because only those atoms and bonds are added that are still not elements of frag. Atoms are removed from the original molecule graph unless the frag is a SelectionMolecule.- Parameters:
- i- atom index
- fragmentationType- type of fragmentation
- frag- add the atoms and bonds to this MoleculeGraph
- Since:
- Marvin 5.6
- See Also:
 
- 
findFragByIdDetermines the subgraph corresponding to the specific fragment ID. Atoms are removed from the original molecule graph unless the frag is a SelectionMolecule.- Parameters:
- fragId- fragment ID
- fragmentationType- type of fragmentation
- frag- add the atoms and bonds to this MoleculeGraph
- Since:
- Marvin 5.6
- See Also:
 
- 
findBasicFragsDetermines the disconnected fragments and puts them into an array. Atoms are removed from the original molecule object unless the fragment class is SelectionMolecule.class.The original atom order is preserved in the returned fragments. Fragment order is also determined by the original atom order. The first fragment is the one containing atom 0, the second fragment is the one containing the smallest indexed atom not in the first fragment, etc. This method provides the basic fragmentation that relies on classical graph theory and is not overwritten by successor class. DO NOT USE WITH OTHER FRAGMENTATION RELATED METHODS like getFragCount()! The length of the returned array and the returned value ofgetFragCount()might be different in successor classes.- Parameters:
- cl- create fragment objects of this class
- Returns:
- array of fragments
- Since:
- Marvin 5.0
 
- 
createGearchprotected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
- 
getMaxRgroupAttachmentPointOrderpublic int getMaxRgroupAttachmentPointOrder()Returns the maximal attachment point order of R-group attachment point atoms in this molecule graph.- Returns:
- the maximal attachment point order
- Since:
- Marvin 5.4
- See Also:
 
- 
mergeFragspublic int mergeFrags(int id1, int id2, int fragmentationType) Merges two connected components of the given fragmentation type.- Parameters:
- id1- index of first atom to be merged into one fragment
- id2- index of second atom to be merged into one fragment
- fragmentationType- determines the type of fragmentation
- Returns:
- the new ID of the merged connected components
- See Also:
 
- 
setFlagsprotected void setFlags(int f, int mask) Sets specified bits in the flags.- Parameters:
- f- new value of the specified bits
- mask- bits to set
 
- 
setValenceCheckEnabledpublic void setValenceCheckEnabled(boolean b) Enables or disables valence check on this molecule graph, depending on the value of the parameter b. Enabled valence check means that the valence check is called for all atoms in this molecule graph when needed.Valence check is enabled initially by default. To configure the options of the valence check see setValenceCheckOptions(ValenceCheckOptions)- Parameters:
- b- - If true, the valence check is enabled on this molecule graph; otherwise valence check is disabled
- Since:
- Marvin 5.4
- See Also:
 
- 
isValenceCheckEnabledpublic boolean isValenceCheckEnabled()Determines whether valence check is enabled on this molecule graph. Enabled valence check means that the valence check is called for all atoms in this molecule graph when needed. Disabling means that valence check is not called anywhere. Valence check may be enabled or disabled by calling thesetValenceCheckEnabledmethod. To configure the options of the valence check seesetValenceCheckOptions(ValenceCheckOptions)- Returns:
- true if the valence check is enabled, false otherwise
- Since:
- Marvin 5.4
- See Also:
 
- 
setValenceCheckState@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setValenceCheckState(MoleculeGraph.ValenceCheckState state) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced bysetValenceCheckOptions(ValenceCheckOptions)andsetValenceCheckEnabled(boolean).
 Usage:// Same as setValenceCheckState(ValenceCheckState.OFF): setValenceCheckEnabled(false); // Same as setValenceCheckState(ValenceCheckState.AMBIGUOUS_AROMATIC_ATOMS_IGNORED): setValenceCheckOptions(ValenceCheckOptions.DEFAULT); // Same as setValenceCheckState(ValenceCheckState.FULL): setValenceCheckOptions(ValenceCheckOptions.GLOBAL);Enables or disables valence check on atoms of the molecule graph, depending on the value of the parameter state. Full valence check means that the valence check is called for all atoms in this molecule graph when needed. When ambiguous aromatic atoms are ignored then these kind of atoms are not checked, their implicit Hydrogen count is not set, they remain untouched. The possibility to ignore Nitrogen-like aromatic atoms is added for speedup reasons because for these atoms implicit Hydrogens can be stored (e.g. in cxsmiles format). Valence check is enabled initially by default.- Parameters:
- state- determines which atoms will be checked in the following calls of- valenceCheck()
- Since:
- Marvin 5.9
- See Also:
 
- 
getValenceCheckState@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public MoleculeGraph.ValenceCheckState getValenceCheckState()Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced bygetValenceCheckOptions()andisValenceCheckEnabled().
 Usage:// Same as getValenceCheckState() == ValenceCheckState.OFF: isValenceCheckEnabled() == true; // Same as getValenceCheckState() == ValenceCheckState.AMBIGUOUS_AROMATIC_ATOMS_IGNORED: getValenceCheckOptions.isLocalAromatic() == true; // Same as getValenceCheckState() == ValenceCheckState.FULL: getValenceCheckOptions.isLocalAromatic() == false;- Returns:
- the valence check state
 
- 
setValenceCheckOptionsSets the options for valence checking. To just enable/disable valence check in the molecule usesetValenceCheckEnabled(boolean). Calling this function with a not null parameter automatically enables the valence check.- Parameters:
- options- the new valence check options
- Since:
- Marvin 6.0
- See Also:
 
- 
getValenceCheckOptionsReturns the options for valence checking. To see if the valence check is enabled on the molecule useisValenceCheckEnabled()- Returns:
- the valence check options
- Since:
- Marvin 6.0
- See Also:
 
- 
isLargeMoleculepublic boolean isLargeMolecule()Returnstrueif large molecule (number of atoms exceeds1000).- Returns:
- trueif large molecule
 
- 
getFreeAttachmentPointsReturns the number of the free attachment points for the given atom.- Specified by:
- getFreeAttachmentPointsin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- the number of the free attachment points or 0if the atom is not located in any SuperatomSgroup
- Since:
- Marvin 5.11
 
- 
getPossibleAttachmentPoints@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) protected int getPossibleAttachmentPoints(MolAtom molAtom) Deprecated, for removal: This API element is subject to removal in a future version.As of Marvin 6.0, replaced bySuperatomSgroup.getAttachmentPointOrders(MolAtom)andMolAtom.getAttachParentSgroup().
 Usage:SuperatomSgroup group = (SuperatomSgroup)molAtom.getAttachParentSgroup()); Listinvalid input: '<Integer'invalid input: '>' orders = group.getAttachmentPointOrders(molAtom); Calculates the possible attachment point value for an atom based on the attachment point settings of the atom.- Parameters:
- molAtom- the atom to calculate the possible attachment point value for
- Returns:
- the calculated attachment point value
- Since:
- Marvin 5.10
- See Also:
 
- 
getAtomReferenceList@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public List<MolAtom> getAtomReferenceList()Deprecated, for removal: This API element is subject to removal in a future version.Useatoms()instead.- Since:
- Marvin 5.11
 
- 
getLigandCountGets the number of ligands of the given atom.- Specified by:
- getLigandCountin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- number of ligands
- Since:
- Marvin 5.11
 
- 
getLigandGets the n-th ligand of the given atom.- Specified by:
- getLigandin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- n- index
- Returns:
- the n-th ligand
- Since:
- Marvin 5.11
 
- 
getLigandBondTypeGets the type of the n-th ligand bond of the given atom.- Specified by:
- getLigandBondTypein interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- i- index
- Returns:
- the bond type
- Since:
- Marvin 5.11
 
- 
getLigandAtnoGets the atomic number of the n-th ligand of the given atom.- Specified by:
- getLigandAtnoin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- n- index
- Returns:
- the atomic number
- Since:
- Marvin 5.11
 
- 
getChargeGets the charge of the given atom.- Specified by:
- getChargein interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- the charge
- Since:
- Marvin 5.11
 
- 
getAtomicNumberGets the atomic number of the given atom.- Specified by:
- getAtomicNumberin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- the atomic number
- Since:
- Marvin 5.11
 
- 
getRadicalCountGets the number of free electrons of the given atom.- Specified by:
- getRadicalCountin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- the number of free electrons
- Since:
- Marvin 5.11
 
- 
getValencePropertyGets the valence property of the given atom.- Specified by:
- getValencePropertyin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- the valence or -1 if not set
- Since:
- Marvin 5.11
 
- 
getImplicitHCountGets the number of implicit hydrogens attached to the given atom.- Specified by:
- getImplicitHCountin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom
- Returns:
- the number of implicit hydrogens
- Since:
- Marvin 5.11
 
- 
isAtomInRingChecks whether the atom is in ring.- Specified by:
- isAtomInRingin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- the atom reference
- Returns:
- true if the atom is in ring, false otherwise
- Since:
- Marvin 5.11
 
- 
isAcceptedSpecialLigand@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2026) public boolean isAcceptedSpecialLigand(MolAtom atom) Deprecated, for removal: This API element is subject to removal in a future version.Check if the ligand is a special atom which changes the ring atom column number with -1- Specified by:
- isAcceptedSpecialLigandin interface- MoleculeWithValence<MolAtom>
- Parameters:
- atom- ligand
- Returns:
- true if the ligand modifies the reference atom column number with -1 else false.
- Since:
- Marvin 5.11
 
- 
getAbbreviationAsMoleculeDescription copied from interface:MoleculeWithValenceIf the given atom is an abbreviation returns the expanded structure, otherwise returns null.- Specified by:
- getAbbreviationAsMoleculein interface- MoleculeWithValence<MolAtom>
 
- 
isBondParallelWithChecks if there is a bond parallel (having same endpoints) with the given bond in this MoleculeGraph.- Parameters:
- b- bond
- Returns:
- true if there is a bond parallel with the given bond else false
 
- 
replaceAtomReplaces the atom on the given index with the parameter atom and removes the parameter atom from its original parent molecule if needed.- Parameters:
- i- the index of the original atom
- newAtom- the atom which will replace the original
 
- 
connectOriginalBondsToNewAtomSets the original connections to the new atom.- Parameters:
- newAtom- the atom which replace the original
- orig- the original atom
- bonds- the original atoms bonds (before any modification)
 
- 
getAtomIteratorReturns an iterator over the atoms in this molecule in proper sequence.- Returns:
- an iterator over the atoms in this molecule in proper sequencer
- Since:
- Marvin 6.2, 2013.09.09.
 
- 
getBondIteratorReturns an iterator over the bonds in this molecule in proper sequence.- Returns:
- an iterator over the bonds in this molecule in proper sequence
- Since:
- Marvin 6.2, 2013.09.09.
 
- 
setSupergraphSets the given molecule as the supergraph of this graph.- Parameters:
- molecule- the molecule
- Since:
- Marvin 14.7.7, Jul 2, 2014
 
- 
atomsProvides an unmodifiable list view of the atoms in the molecule. It is a dynamic view, which follows every change of the molecule structure. However, you must not add or remove atoms and bonds during iteration.- Specified by:
- atomsin interface- MoleculeWithValence<MolAtom>
- Returns:
- a dynamic list view of the atoms
 
- 
bondsProvides an unmodifiable list view of the bonds in the molecule. It is a dynamic view, which follows every change of the molecule structure. However, you must not add or remove atoms and bonds during iteration.- Returns:
- a dynamic list view of the bonds
 
- 
fixPropertiespublic void fixProperties()Delegates to tracker's fixProperties().
 
- 
setValenceCheckOptions(ValenceCheckOptions)andValenceCheckOptions.