public class ChemModelManipulator extends Object
ChemModelManipulator.removeAtom(chemModel, atom);will find the Atom in the model by traversing the ChemModel's MoleculeSet, Crystal and ReactionSet fields and remove it with the removeAtom(Atom) method.
AtomContainer.removeAtomAndConnectedElectronContainers(IAtom)
Constructor and Description |
---|
ChemModelManipulator() |
Modifier and Type | Method and Description |
---|---|
static IAtomContainer |
createNewMolecule(IChemModel chemModel)
Adds a new Molecule to the MoleculeSet inside a given ChemModel.
|
static List<IAtomContainer> |
getAllAtomContainers(IChemModel chemModel)
Returns all the AtomContainer's of a ChemModel.
|
static List<IChemObject> |
getAllChemObjects(IChemModel chemModel)
Retrieve a List of all ChemObject objects within an IChemModel.
|
static List<String> |
getAllIDs(IChemModel chemModel) |
static int |
getAtomCount(IChemModel chemModel)
Get the total number of atoms inside an IChemModel.
|
static int |
getBondCount(IChemModel chemModel)
Get the total number of bonds inside an IChemModel.
|
static IAtomContainer |
getRelevantAtomContainer(IChemModel chemModel,
IAtom atom)
This badly named methods tries to determine which AtomContainer in the
ChemModel is best suited to contain added Atom's and Bond's.
|
static IAtomContainer |
getRelevantAtomContainer(IChemModel chemModel,
IBond bond)
Retrieves the first IAtomContainer containing a given IBond from an
IChemModel.
|
static IReaction |
getRelevantReaction(IChemModel chemModel,
IAtom atom)
Retrieves the first IReaction containing a given IAtom from an
IChemModel.
|
static IChemModel |
newChemModel(IAtomContainer atomContainer)
Create a new ChemModel containing an IAtomContainer.
|
static void |
removeAtomAndConnectedElectronContainers(IChemModel chemModel,
IAtom atom)
Remove an Atom and the connected ElectronContainers from all AtomContainers
inside an IChemModel.
|
static void |
removeElectronContainer(IChemModel chemModel,
IElectronContainer electrons)
Remove an ElectronContainer from all AtomContainers
inside an IChemModel.
|
static void |
setAtomProperties(IChemModel chemModel,
Object propKey,
Object propVal)
Sets the AtomProperties of all Atoms inside an IChemModel.
|
public static int getAtomCount(IChemModel chemModel)
chemModel
- The IChemModel object.public static int getBondCount(IChemModel chemModel)
chemModel
- The IChemModel object.public static void removeAtomAndConnectedElectronContainers(IChemModel chemModel, IAtom atom)
chemModel
- The IChemModel object.atom
- The Atom object to remove.public static void removeElectronContainer(IChemModel chemModel, IElectronContainer electrons)
chemModel
- The IChemModel object.electrons
- The ElectronContainer to remove.public static IAtomContainer createNewMolecule(IChemModel chemModel)
chemModel
- The ChemModel object.public static IChemModel newChemModel(IAtomContainer atomContainer)
IAtomContainer
from the passed IAtomContainer when needed, which may cause
information loss.atomContainer
- The AtomContainer to have inside the ChemModel.public static IAtomContainer getRelevantAtomContainer(IChemModel chemModel, IAtom atom)
public static IAtomContainer getRelevantAtomContainer(IChemModel chemModel, IBond bond)
chemModel
- The IChemModel object.bond
- The IBond object to search.public static IReaction getRelevantReaction(IChemModel chemModel, IAtom atom)
chemModel
- The IChemModel object.atom
- The IAtom object to search.public static List<IAtomContainer> getAllAtomContainers(IChemModel chemModel)
public static void setAtomProperties(IChemModel chemModel, Object propKey, Object propVal)
chemModel
- The IChemModel object.propKey
- The key of the property.propVal
- The value of the property.public static List<IChemObject> getAllChemObjects(IChemModel chemModel)
chemModel
- The IChemModel object.public static List<String> getAllIDs(IChemModel chemModel)
Copyright © 2018. All Rights Reserved.