$darkmode
DENOPTIM
|
Class representing a continuously connected portion of chemical object holding attachment points. More...
Public Member Functions | |
Fragment () | |
Constructor of an empty fragment. More... | |
Fragment (long vertexId) | |
Constructor for a molecular fragment kind of vertex. More... | |
Fragment (long l, IAtomContainer mol, BBType bbt) throws DENOPTIMException | |
Constructor from an atom container, which has APs only as molecular properties. More... | |
Fragment (long vertexId, IAtomContainer mol, BBType bbt, boolean isRCV) throws DENOPTIMException | |
Fragment (IAtomContainer mol, BBType bbt) throws DENOPTIMException | |
Constructor from another atom container, which has APs only as molecular properties. More... | |
boolean | is3D () |
Checks if atoms and APs contained in this fragment have non-zero 3D coordinates. More... | |
void | addAP (int atomPositionNumber) |
Adds an attachment point with a dummy APClass. More... | |
void | addAP (int atomPositionNumber, APClass apClass) |
Adds an attachment point. More... | |
AttachmentPoint | addAP (int atomPositionNumber, Point3d dirVec, APClass apClass) |
Adds an attachment point. More... | |
void | addAP (int srcAtmId, APClass apc, Point3d vector) |
Add an attachment point to the specifies atom. More... | |
AttachmentPoint | addAPOnAtom (IAtom srcAtm, APClass apc, Point3d vector) |
Add an attachment point to the specifies atom. More... | |
void | removeAP (AttachmentPoint ap) |
ArrayList< AttachmentPoint > | getAPsFromAtom (IAtom srcAtm) |
int | getAPCountOnAtom (int srcAtmId) |
Returns the number of APs currently defined on a specific atom source. More... | |
int | getAPCountOnAtom (IAtom srcAtm) |
Returns the number of APs currently defined on a specific atom source. More... | |
void | updateAPs () |
Changes the properties of each APs as to reflect the current atom list. More... | |
List< AttachmentPoint > | getCurrentAPs () |
Collects APs currently defined as properties of the atoms. More... | |
void | projectPropertyToAP () throws DENOPTIMException |
Uses the molecular property defining attachment points to create the DENOPTIMAttachmentPoint objects in the Atom objects. More... | |
void | projectPropertyToAP (String allAtomsProp) throws DENOPTIMException |
Uses a string formatted like the molecular property used for defining attachment points to create the DENOPTIMAttachmentPoint objects in the Atom objects. More... | |
void | projectListAPToAtomProperties () |
Takes the list of APs from the field of this class and projects the APs into properties of the IAtom s. More... | |
void | projectAPsToProperties () |
Finds the DENOPTIMAttachmentPoint objects defined as properties of the atoms in this container, and defines the string-based molecular property used to print attachment points in SDF files. More... | |
Fragment | clone () |
Returns a deep copy of this fragments. More... | |
IAtomContainer | getIAtomContainer () |
IAtomContainer | getIAtomContainer (Logger logger, Randomizer rng, boolean removeUsedRCAs, boolean rebuild) |
Although this type of vertex contains atoms, its content is fixed. More... | |
Iterable< IAtom > | atoms () |
Iterable< IBond > | bonds () |
void | addAtom (IAtom atom) |
IAtom | getAtom (int number) |
int | indexOf (IAtom atom) |
int | getAtomCount () |
int | getBondCount () |
void | addBond (IBond bond) |
IBond | removeBond (int position) |
IBond | removeBond (IAtom atom1, IAtom atom2) |
void | removeBond (IBond bond) |
void | removeAtom (IAtom atom) |
void | removeAtoms (Collection< IAtom > atoms) |
Removes a list of atoms and updates the list of attachment points. More... | |
List< IAtom > | getConnectedAtomsList (IAtom atom) |
int | getConnectedAtomsCount (IAtom atom) |
boolean | sameAs (Fragment other, StringBuilder reason) |
Compares this and another fragment ignoring vertex IDs. More... | |
DefaultUndirectedGraph< FragIsomorphNode, FragIsomorphEdge > | getJGraphFragIsomorphism () |
Creates a graph representation of this fragment where both atoms and AttachmentPoint s are represented as nodes, and edges are either bonds or atom-to-attachment point connections. More... | |
boolean | isIsomorphicTo (Vertex other) |
Checks for isomorphism of the graph representation of this and another fragment. More... | |
int | getHeavyAtomsCount () |
boolean | containsAtoms () |
String | toString () |
Produces a human readable, short string to represent the vertex by its vertex ID, building block ID (1-based), building block type, and level in the graph (if any). More... | |
List< AttachmentPoint > | getAttachmentPoints () |
List< SymmetricAPs > | getSymmetricAPSets () |
List< Vertex > | getMutationSites (List< MutationType > ignoredTypes) |
A list of mutation sites from within this vertex. More... | |
String | toJson () |
Produces a string that represents this vertex and that adheres to the JSON format. More... | |
IAtom | getAtomHoldingAP (AttachmentPoint ap) |
Returns the atom where the given attachment point is rooted, i.e., the atom that is involved in the bond resulting from using the attachment point to form an edge with a BondType that leads to bond creation. More... | |
Public Member Functions inherited from denoptim.graph.Vertex | |
Vertex (VertexType vertexType) | |
Constructor for an empty vertex. More... | |
Vertex (VertexType vertexType, long id) | |
Constructor for an identified vertex without attachment points. More... | |
abstract List< AttachmentPoint > | getAttachmentPoints () |
void | setAsRCV (boolean isRCV) |
void | setVertexId (long vertexId2) |
long | getVertexId () |
int | getBuildingBlockId () |
Returns the index of the building block that should correspond to the position of the building block in the library of building blocks of its kind. More... | |
void | setBuildingBlockId (int buildingBlockId) |
Vertex.BBType | getBuildingBlockType () |
void | setBuildingBlockType (Vertex.BBType buildingBlockType) |
abstract List< SymmetricAPs > | getSymmetricAPSets () |
SymmetricAPs | getSymmetricAPs (AttachmentPoint ap) |
For the given attachment point index locate the symmetric partners i.e. More... | |
int | getNumberOfAPs () |
int | getFreeAPCount () |
ArrayList< AttachmentPoint > | getFreeAPThroughout () |
Gets attachment points that are availability throughout the graph level, i.e., checks also across the inner graph template boundary. More... | |
int | getFreeAPCountThroughout () |
Counts the number of attachment points that are availability throughout the graph level, i.e., checks also across the inner graph template boundary. More... | |
ArrayList< AttachmentPoint > | getCappedAPs () |
Gets attachment points that are used by capping groups. More... | |
ArrayList< AttachmentPoint > | getCappedAPsThroughout () |
Gets attachment points that are used by capping groups throughout the graph levels, i.e., checks also across the inner graph template boundary. More... | |
int | getCappedAPCountThroughout () |
Counts the number of attachment points that are used by BBType#CAP vertex. More... | |
boolean | hasFreeAP () |
boolean | isRCV () |
boolean | hasSymmetricAP () |
String | toString () |
Produces a human readable, short string to represent the vertex by its vertex ID, building block ID (1-based), building block type, and level in the graph (if any). More... | |
void | cleanup () |
abstract Vertex | clone () |
Returns a deep-copy of this vertex. More... | |
boolean | sameAs (Vertex other) |
Compares this and another vertex ignoring vertex IDs. More... | |
boolean | sameAs (Vertex other, StringBuilder reason) |
Compares this and another vertex ignoring vertex IDs. More... | |
boolean | sameVertexFeatures (Vertex other, StringBuilder reason) |
Compares this and another vertex ignoring vertex IDs. More... | |
abstract int | getHeavyAtomsCount () |
abstract boolean | containsAtoms () |
abstract IAtomContainer | getIAtomContainer () |
abstract IAtomContainer | getIAtomContainer (Logger logger, Randomizer rng, boolean removeUsedRCAs, boolean rebuild) |
Method meant to trigger regeneration of the chemical representation, typically needed to drop a low quality structure that is good enough for most cheminformatic tasks, and replace it with a better quality structure that is suitable to be fed to molecular modeling tasks. More... | |
ArrayList< APClass > | getAllAPClasses () |
Returns the list of all APClasses present on this vertex. More... | |
ArrayList< APClass > | getAllAvailableAPClasses () |
Returns the list of all APClasses present on free attachment point on this vertex. More... | |
void | resetGraphOwner () |
void | setGraphOwner (DGraph owner) |
DGraph | getGraphOwner () |
Returns the graph this vertex belongs to or null. More... | |
List< Vertex > | getMutationSites () |
A list of mutation sites from within this vertex. More... | |
abstract List< Vertex > | getMutationSites (List< MutationType > ignoredTypes) |
A list of mutation sites from within this vertex. More... | |
void | setMutationTypes (List< MutationType > lst) |
boolean | removeMutationType (MutationType mt) |
Removes the specified mutation type. More... | |
List< MutationType > | getMutationTypes () |
Returns the list of mutation types. More... | |
List< MutationType > | getMutationTypes (List< MutationType > excludedTypes) |
Returns the list of mutation types. More... | |
AttachmentPoint | getAP (int i) |
Get attachment point i on this vertex. More... | |
AttachmentPoint | getAPWithId (int i) |
Get attachment point that has the given identifier, or null. More... | |
int | getIndexOfAP (AttachmentPoint ap) |
Returns the position of the given AP in the list of APs of this vertex. More... | |
Edge | getEdgeToParent () |
Looks into the edges that use any of the APs that belong to this vertex and returns the edge that has this vertex as the target, i.e., the edge to the parent vertex. More... | |
Vertex | getParent () |
Looks into the edges that use any of the APs that belong to this vertex and returns the vertex which is the source of the edge in which this vertex is the target. More... | |
ArrayList< AttachmentPoint > | getAPsFromChildren () |
Looks into the edges that use any of the APs that belong to this vertex and returns the list of attachment point on child vertices that form an edge with any of the APs of this vertex. More... | |
ArrayList< Vertex > | getChildrenThroughout () |
Looks into the edges that use any of the APs that belong to this vertex and returns the list of vertices which are target of any edge departing from this vertex. More... | |
ArrayList< Vertex > | getChilddren () |
Looks into the edges that use any of the APs that belong to this vertex and returns the list of vertices which are target of any edge departing from this vertex. More... | |
void | setUniquefyingProperty (String key) |
Add the given key among the properties that are checked for equality when comparing vertices with the Vertex#sameAs(Vertex, StringBuilder) method. More... | |
Map< Object, Object > | getProperties () |
boolean | hasProperty (Object property) |
Object | getProperty (Object property) |
void | setProperty (Object key, Object property) |
void | removeProperty (Object key) |
void | setProperties (Map< Object, Object > properties) |
VertexType | getVertexType () |
Returns the value of the vertex type. More... | |
String[] | getPathIDs (AttachmentPoint apA, AttachmentPoint apB) |
Produces a pair of strings that identify the "path" between two given attachment points. More... | |
boolean | connectedTo (Vertex other) |
Checks if this and another vertex are directly connected by an edge within the same graph recursion level, i.e., both vertices must belong to the same graph. More... | |
Edge | getEdgeWith (Vertex other) |
Finds the edge between this and the other vertex, if it exists. More... | |
Static Public Member Functions | |
static Fragment | fromJson (String json) |
Reads a JSON string and returns an instance of this class. More... | |
Static Public Member Functions inherited from denoptim.graph.Vertex | |
static Vertex | newVertexFromLibrary (int bbId, Vertex.BBType bbt, FragmentSpace fragSpace) throws DENOPTIMException |
Builds a new molecular fragment kind of vertex. More... | |
static Vertex | newVertexFromLibrary (long vertexId, int bbId, Vertex.BBType bbt, FragmentSpace fragSpace) throws DENOPTIMException |
Make a new vertex that is a copy of a vertex in the fragment space. More... | |
static Vertex | fromJson (String json) |
static Vertex | convertIACToVertex (IAtomContainer iac, Vertex.BBType bbt) throws DENOPTIMException |
Processes an IAtomContainer and builds a Vertex that is an instance of Fragment . More... | |
static Vertex | parseVertexFromSDFFormat (IAtomContainer mol, Gson reader, BBType bbt) throws DENOPTIMException |
Created a Vertex from the SDF representation, i.e., from an IAtomContainer . More... | |
Protected Member Functions | |
void | setSymmetricAPSets (List< SymmetricAPs > sAPs) |
void | addSymmetricAPSet (SymmetricAPs symAPs) |
Protected Member Functions inherited from denoptim.graph.Vertex | |
abstract void | setSymmetricAPSets (List< SymmetricAPs > sAPs) |
abstract void | addSymmetricAPSet (SymmetricAPs symAPs) |
int | getUniqueAPIndex () |
List< MutationType > | getUnfilteredMutationTypes () |
Returns the mutation types that are constitutionally configures for this vertex irrespectively on the graph or the context in which this vertex is included. More... | |
Map< Object, Object > | copyStringBasedProperties () |
Copies all the string-based properties and properties defined in the Vertex#uniquefyingPropertyKeys set. More... | |
Private Member Functions | |
void | updateSymmetryRelations () |
Depends on an healthy list of attachment points with properly set pointers to the source atoms. More... | |
Static Private Member Functions | |
static List< SymmetricAPs > | identifySymmetryRelatedAPSets (IAtomContainer mol, List< AttachmentPoint > daps) |
static boolean | atomsAreCompatible (IAtomContainer mol, int a1, int a2) |
Checks if the atoms at the given positions have similar environments i.e. More... | |
Private Attributes | |
List< AttachmentPoint > | lstAPs |
attachment points on this vertex More... | |
List< SymmetricAPs > | lstSymAPs |
List of AP sets that are related to each other, so that we call them "symmetric" (though symmetry is a fuzzy concept here). More... | |
IAtomContainer | mol |
Molecular representation of this fragment. More... | |
DefaultUndirectedGraph< FragIsomorphNode, FragIsomorphEdge > | jGraphFragIsomorphism |
jGraph representation used for detecting fragment isomorphism. More... | |
Additional Inherited Members | |
Protected Attributes inherited from denoptim.graph.Vertex | |
int | buildingBlockId = -99 |
Index of this building block in the library of building blocks, or negative if this vertex is not part of a library. More... | |
BBType | buildingBlockType = Vertex.BBType.UNDEFINED |
Map< Object, Object > | properties |
Map of customizable properties. More... | |
Set< String > | uniquefyingPropertyKeys = new HashSet<String>() |
List of properties required to make Vertex#sameAs(Vertex, StringBuilder) method return false when property values differ. More... | |
final VertexType | vertexType |
Field distinguishing implementations of Vertex when deserializing JSON representations. More... | |
Class representing a continuously connected portion of chemical object holding attachment points.
Definition at line 60 of file Fragment.java.
denoptim.graph.Fragment.Fragment | ( | ) |
Constructor of an empty fragment.
Definition at line 91 of file Fragment.java.
References denoptim.graph.Vertex.VertexType.MolecularFragment.
Referenced by denoptim.graph.Fragment.clone(), and denoptim.graph.Fragment.isIsomorphicTo().
denoptim.graph.Fragment.Fragment | ( | long | vertexId | ) |
Constructor for a molecular fragment kind of vertex.
vertexId | unique identified of the vertex |
Definition at line 107 of file Fragment.java.
References denoptim.graph.Vertex.VertexType.MolecularFragment, and denoptim.graph.Vertex.vertexId.
denoptim.graph.Fragment.Fragment | ( | long | l, |
IAtomContainer | mol, | ||
BBType | bbt | ||
) | throws DENOPTIMException |
Constructor from an atom container, which has APs only as molecular properties.
Property DENOPTIMConstants#ISOMORPHICFAMILYID
is copied into the fragment, if present. WARNING: other properties of the atom container are not imported!
l | the identifier of the vertex to construct |
mol | the molecular representation |
DENOPTIMException |
Definition at line 130 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.APSTAG, denoptim.graph.Fragment.getAttachmentPoints(), denoptim.graph.Vertex.getNumberOfAPs(), denoptim.graph.Fragment.identifySymmetryRelatedAPSets(), denoptim.constants.DENOPTIMConstants.ISOMORPHICFAMILYID, denoptim.utils.MoleculeUtils.makeSameAs(), denoptim.graph.Fragment.mol, denoptim.graph.Vertex.VertexType.MolecularFragment, denoptim.graph.Fragment.projectPropertyToAP(), denoptim.graph.rings.RingClosingAttractor.RCAAPCLASSSET, denoptim.graph.Vertex.setAsRCV(), denoptim.graph.Vertex.setBuildingBlockType(), denoptim.graph.Vertex.setProperty(), denoptim.graph.Fragment.setSymmetricAPSets(), and denoptim.utils.MoleculeUtils.setZeroImplicitHydrogensToAllAtoms().
denoptim.graph.Fragment.Fragment | ( | long | vertexId, |
IAtomContainer | mol, | ||
BBType | bbt, | ||
boolean | isRCV | ||
) | throws DENOPTIMException |
Definition at line 167 of file Fragment.java.
References denoptim.graph.Vertex.isRCV, denoptim.graph.Fragment.mol, denoptim.graph.Vertex.setAsRCV(), and denoptim.graph.Vertex.vertexId.
denoptim.graph.Fragment.Fragment | ( | IAtomContainer | mol, |
BBType | bbt | ||
) | throws DENOPTIMException |
Constructor from another atom container, which has APs only as molecular properties.
WARNING: properties of the atom container are not imported!
mol | the molecular representation |
DENOPTIMException |
Definition at line 183 of file Fragment.java.
References denoptim.graph.Fragment.mol.
void denoptim.graph.Fragment.addAP | ( | int | atomPositionNumber | ) |
Adds an attachment point with a dummy APClass.
atomPositionNumber | the index of the source atom (0-based) |
Definition at line 343 of file Fragment.java.
References denoptim.graph.Fragment.addAP().
Referenced by denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.addAPOnAtom(), denoptim.ga.GraphOperationsTest.buildFragment(), denoptim.graph.TemplateTest.getAmideFragment(), denoptim.fragspace.FragmentSpaceTest.getCarbonVertex(), denoptim.graph.TemplateTest.getCH2Fragment(), denoptim.graph.TemplateTest.getOHFragment(), denoptim.fragspace.FragmentSpace.getPolarizedRCV(), denoptim.fragmenter.FragmenterTools.getRCPForAP(), denoptim.fragspace.FragmentSpaceTest.getRCV(), denoptim.graph.DGraphTest.makeTestGraphA(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphA(), denoptim.graph.rings.RingSizeManagerTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphA2(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphB(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.fragmenter.FragmentClustererTest.testCluster2(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFString(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFStringNoDirVec(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.rings.PathClosabilityToolsTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RandomCombOfRingIteratorTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragmenter.ConformerExtractorTaskTest.testExtractClusterableFragments(), denoptim.fragmenter.FragmenterToolsTest.testFilterFragment(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetCentroid(), denoptim.fragmenter.FragmentAlignementTest.testGetMinimumRMSD(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetNearestToCentroid(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass(), denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy(), denoptim.graph.DGraphTest.testRemoveCapping(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.fragmenter.ClusterableFragmentTest.testSetNaturalNodeOrder(), and denoptim.graph.AttachmentPointTest.testSortAPs().
void denoptim.graph.Fragment.addAP | ( | int | atomPositionNumber, |
APClass | apClass | ||
) |
Adds an attachment point.
atomPositionNumber | the index of the source atom (0-based) |
apClass | the APClass |
Definition at line 355 of file Fragment.java.
References denoptim.graph.Fragment.addAP().
AttachmentPoint denoptim.graph.Fragment.addAP | ( | int | atomPositionNumber, |
Point3d | dirVec, | ||
APClass | apClass | ||
) |
Adds an attachment point.
atomPositionNumber | the index of the source atom (0-based) |
dirVec | the AP direction vector end (the beginning at the coordinates of the source atom). |
apClass | the APClass |
Definition at line 369 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.Fragment.getAPCountOnAtom(), denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.Fragment.getAttachmentPoints(), denoptim.graph.Fragment.mol, and denoptim.graph.Fragment.updateSymmetryRelations().
void denoptim.graph.Fragment.addAP | ( | int | srcAtmId, |
APClass | apc, | ||
Point3d | vector | ||
) |
Add an attachment point to the specifies atom.
srcAtmId | the index of the source atom in the atom list of this chemical representation. Index must be 0-based. |
apc | the attachment point class, or null, if class should not be defines. |
vector | the coordinates of the 3D point representing the end of the attachment point direction vector, or null. The coordinates must be consistent with the coordinates of the atoms. |
valence | the valences used by this AP. |
Definition at line 404 of file Fragment.java.
References denoptim.graph.Fragment.addAPOnAtom(), and denoptim.graph.Fragment.mol.
AttachmentPoint denoptim.graph.Fragment.addAPOnAtom | ( | IAtom | srcAtm, |
APClass | apc, | ||
Point3d | vector | ||
) |
Add an attachment point to the specifies atom.
srcAtm | the source atom in the atom list of this chemical representation. |
apc | the attachment point class, or null, if class should not be defines. |
vector | the coordinates of the 3D point representing the end of the attachment point direction vector, or null. The coordinates must be consistent with the coordinates of the atoms. |
Definition at line 424 of file Fragment.java.
References denoptim.graph.Fragment.addAP(), and denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.Fragment.addAP(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.gui.GUIVertexInspector.convertAtomToAP(), denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.graph.FragmentTest.makeFragment(), denoptim.graph.FragmentTest.makeFragmentA(), denoptim.graph.FragmentTest.makeFragmentB(), denoptim.graph.FragmentTest.makeFragmentC(), denoptim.graph.FragmentIsomorphismInspectorTest.makePathologicalFragment(), denoptim.io.DenoptimIOTest.testAppendToJSON(), denoptim.graph.VertexTest.testClone(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.graph.SymmetricAPsTest.testGetSameAsThis(), denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), denoptim.graph.AttachmentPointTest.testHasSameSrcAtom(), denoptim.io.DenoptimIOTest.testReadAllAPClasses(), denoptim.graph.SymmetricAPsTest.testSameAs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.graph.Fragment.addAtom | ( | IAtom | atom | ) |
Definition at line 836 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.fragspace.FragmentSpace.getPolarizedRCV(), denoptim.graph.FragmentTest.makeFragment(), denoptim.graph.FragmentTest.makeFragmentA(), denoptim.graph.FragmentTest.makeFragmentB(), denoptim.graph.FragmentTest.makeFragmentC(), denoptim.graph.FragmentIsomorphismInspectorTest.makePathologicalFragment(), denoptim.io.DenoptimIOTest.testAppendToJSON(), denoptim.graph.VertexTest.testClone(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFString(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFStringNoDirVec(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass(), denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), denoptim.graph.AttachmentPointTest.testHasSameSrcAtom(), denoptim.io.DenoptimIOTest.testReadAllAPClasses(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.graph.AttachmentPointTest.testSortAPs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.graph.Fragment.addBond | ( | IBond | bond | ) |
Definition at line 871 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.FragmentTest.makeFragment(), denoptim.graph.FragmentTest.makeFragmentA(), denoptim.graph.FragmentTest.makeFragmentB(), denoptim.graph.FragmentTest.makeFragmentC(), denoptim.graph.FragmentIsomorphismInspectorTest.makePathologicalFragment(), denoptim.graph.VertexTest.testClone(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass(), denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), denoptim.graph.AttachmentPointTest.testHasSameSrcAtom(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
|
protected |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1136 of file Fragment.java.
Iterable< IAtom > denoptim.graph.Fragment.atoms | ( | ) |
Definition at line 822 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), denoptim.fragmenter.FragmenterTools.filterFragment(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.fragmenter.FragmentClustererTest.getMol(), denoptim.graph.Fragment.is3D(), denoptim.graph.Fragment.removeAtoms(), denoptim.fragmenter.ClusterableFragment.setNaturalNodeOrder(), denoptim.fragmenter.FragmentClustererTest.testCluster(), and denoptim.fragmenter.ConformerExtractorTaskTest.testExtractClusterableFragments().
|
staticprivate |
Checks if the atoms at the given positions have similar environments i.e.
are similar in atom types etc.
mol | |
a1 | atom position |
a2 | atom position |
true
if atoms have similar environments Definition at line 298 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.Fragment.identifySymmetryRelatedAPSets().
Iterable< IBond > denoptim.graph.Fragment.bonds | ( | ) |
Definition at line 829 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.MoleculeUtils.extractIACForSubgraph(), and denoptim.gui.GUIVertexInspector.removeAtoms().
Fragment denoptim.graph.Fragment.clone | ( | ) |
Returns a deep copy of this fragments.
Reimplemented from denoptim.graph.Vertex.
Definition at line 733 of file Fragment.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.Fragment.clone(), denoptim.graph.Vertex.copyStringBasedProperties(), denoptim.graph.Fragment.Fragment(), denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.getBuildingBlockId(), denoptim.graph.Vertex.getBuildingBlockType(), denoptim.graph.Fragment.getSymmetricAPSets(), denoptim.graph.Vertex.getUnfilteredMutationTypes(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.Vertex.isRCV, denoptim.graph.Fragment.lstAPs, denoptim.utils.MoleculeUtils.makeSameAs(), denoptim.graph.Fragment.mol, denoptim.graph.Fragment.projectListAPToAtomProperties(), denoptim.graph.Vertex.setAsRCV(), denoptim.graph.Vertex.setBuildingBlockId(), denoptim.graph.Vertex.setBuildingBlockType(), denoptim.graph.AttachmentPoint.setCutId(), denoptim.graph.AttachmentPoint.setID(), denoptim.graph.Vertex.setMutationTypes(), denoptim.graph.Vertex.setProperties(), denoptim.graph.Fragment.setSymmetricAPSets(), denoptim.graph.Vertex.setVertexId(), and denoptim.graph.Vertex.uniquefyingPropertyKeys.
Referenced by denoptim.graph.Fragment.clone(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), denoptim.graph.rings.RingSizeManagerTest.makeTestGraphA(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.graph.FragmentTest.testClone(), denoptim.graph.VertexTest.testClone(), denoptim.graph.rings.PathClosabilityToolsTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RandomCombOfRingIteratorTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragmenter.ConformerExtractorTaskTest.testExtractClusterableFragments(), denoptim.fragmenter.FragmentAlignementTest.testGetMinimumRMSD(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), and denoptim.graph.AttachmentPointTest.testHasSameSrcAtom().
boolean denoptim.graph.Fragment.containsAtoms | ( | ) |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1100 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.Fragment.sameAs().
|
static |
Reads a JSON string and returns an instance of this class.
Fields that depend on the context of this vertex, such as the graph 'owner' of this vertex and the 'user' of each attachment point, are recovered, if needed, upon deserialization of the graph that contains this vertex.
json | the string to parse. |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1207 of file Fragment.java.
References denoptim.graph.Fragment.fromJson(), denoptim.graph.Fragment.getAttachmentPoints(), denoptim.json.DENOPTIMgson.getReader(), and denoptim.graph.Fragment.projectListAPToAtomProperties().
Referenced by denoptim.graph.Vertex.DENOPTIMVertexDeserializer.deserialize(), and denoptim.graph.Fragment.fromJson().
int denoptim.graph.Fragment.getAPCountOnAtom | ( | IAtom | srcAtm | ) |
Returns the number of APs currently defined on a specific atom source.
srcAtm | the source atom |
DENOPTIMException |
Definition at line 490 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, and denoptim.graph.Fragment.getAPsFromAtom().
int denoptim.graph.Fragment.getAPCountOnAtom | ( | int | srcAtmId | ) |
Returns the number of APs currently defined on a specific atom source.
srcAtmId | the index of the atom |
DENOPTIMException |
Definition at line 475 of file Fragment.java.
References denoptim.graph.Fragment.getAPCountOnAtom(), and denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.Fragment.addAP(), denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), denoptim.graph.Fragment.getAPCountOnAtom(), denoptim.graph.Fragment.removeAP(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty(), and denoptim.json.DENOPTIMgsonTest.testMolecularFragmentSerialization().
ArrayList< AttachmentPoint > denoptim.graph.Fragment.getAPsFromAtom | ( | IAtom | srcAtm | ) |
Definition at line 455 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS.
Referenced by denoptim.graph.Fragment.addAP(), denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), denoptim.graph.Fragment.getAPCountOnAtom(), denoptim.graph.Fragment.getCurrentAPs(), denoptim.graph.Fragment.projectAPsToProperties(), denoptim.graph.Fragment.projectListAPToAtomProperties(), denoptim.graph.Fragment.removeAP(), denoptim.gui.GUIVertexInspector.removeAtoms(), denoptim.graph.Fragment.removeAtoms(), and denoptim.graph.Fragment.updateAPs().
IAtom denoptim.graph.Fragment.getAtom | ( | int | number | ) |
Definition at line 843 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.gui.FragmentViewPanel.getAtomsSelectedFromJMol(), denoptim.gui.FragmentViewPanel.getLoadedStructure(), denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), denoptim.graph.FragmentIsomorphismInspectorTest.makePathologicalFragment(), denoptim.io.DenoptimIOTest.testAppendToJSON(), denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.graph.SymmetricAPsTest.testGetSameAsThis(), denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy(), denoptim.graph.SymmetricAPsTest.testSameAs(), and denoptim.gui.FragmentViewPanel.updateAPsInJmolViewer().
int denoptim.graph.Fragment.getAtomCount | ( | ) |
Definition at line 857 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.gui.FragmentViewPanel.getAtomsSelectedFromJMol(), denoptim.gui.FragmentViewPanel.getLoadedStructure(), and denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy().
IAtom denoptim.graph.Fragment.getAtomHoldingAP | ( | AttachmentPoint | ap | ) |
Returns the atom where the given attachment point is rooted, i.e., the atom that is involved in the bond resulting from using the attachment point to form an edge with a BondType
that leads to bond creation.
ap | the attachment point to find the source of. |
Definition at line 1234 of file Fragment.java.
References denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.AttachmentPoint.getOwner(), and denoptim.graph.Fragment.mol.
List< AttachmentPoint > denoptim.graph.Fragment.getAttachmentPoints | ( | ) |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1120 of file Fragment.java.
References denoptim.graph.Fragment.lstAPs.
Referenced by denoptim.graph.Fragment.addAP(), denoptim.fragmenter.FragmenterTools.filterFragment(), denoptim.graph.Fragment.Fragment(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.graph.Fragment.fromJson(), denoptim.graph.Fragment.getJGraphFragIsomorphism(), denoptim.fragmenter.FragmentClustererTest.getMol(), denoptim.graph.Fragment.is3D(), denoptim.graph.Fragment.isIsomorphicTo(), denoptim.graph.Fragment.removeAP(), denoptim.gui.GUIVertexInspector.removeAtoms(), denoptim.fragmenter.ClusterableFragment.setNaturalNodeOrder(), denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.fragmenter.ConformerExtractorTaskTest.testExtractClusterableFragments(), denoptim.json.DENOPTIMgsonTest.testMolecularFragmentSerialization(), denoptim.graph.AttachmentPointTest.testSortAPs(), and denoptim.graph.Fragment.updateSymmetryRelations().
int denoptim.graph.Fragment.getBondCount | ( | ) |
Definition at line 864 of file Fragment.java.
References denoptim.graph.Fragment.mol.
int denoptim.graph.Fragment.getConnectedAtomsCount | ( | IAtom | atom | ) |
Definition at line 950 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), and denoptim.gui.GUIVertexInspector.convertAtomToAP().
List< IAtom > denoptim.graph.Fragment.getConnectedAtomsList | ( | IAtom | atom | ) |
Definition at line 943 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), and denoptim.gui.GUIVertexInspector.convertAtomToAP().
List< AttachmentPoint > denoptim.graph.Fragment.getCurrentAPs | ( | ) |
Collects APs currently defined as properties of the atoms.
Converts the internal notation defining APs (i.e., APs are stored in as atom-specific properties) to the standard DENOPTIM formalism (i.e., APs are collected in a molecular property). WARNING: cannot be used after altering the atom list!
Definition at line 541 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.Fragment.lstAPs, denoptim.graph.Fragment.mol, and denoptim.graph.Fragment.updateAPs().
Referenced by denoptim.gui.FragmentViewPanel.updateAPsMapAndTable().
int denoptim.graph.Fragment.getHeavyAtomsCount | ( | ) |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1093 of file Fragment.java.
References denoptim.utils.MoleculeUtils.getHeavyAtomCount(), and denoptim.graph.Fragment.mol.
IAtomContainer denoptim.graph.Fragment.getIAtomContainer | ( | ) |
Reimplemented from denoptim.graph.Vertex.
Definition at line 788 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.APSTAG, denoptim.constants.DENOPTIMConstants.ATMPROPORIGINALATMID, denoptim.constants.DENOPTIMConstants.ATMPROPVERTEXID, denoptim.graph.Vertex.getProperty(), denoptim.graph.Vertex.getVertexId(), denoptim.constants.DENOPTIMConstants.ISOMORPHICFAMILYID, denoptim.graph.Fragment.mol, denoptim.graph.Fragment.projectAPsToProperties(), and denoptim.constants.DENOPTIMConstants.VERTEXJSONTAG.
Referenced by denoptim.utils.DummyAtomHandler.addDummiesOnLinearities(), denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.fragmenter.FragmenterTools.filterFragment(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.graph.Fragment.getIAtomContainer(), denoptim.gui.FragmentViewPanel.getLoadedStructure(), denoptim.gui.FragmentViewPanel.loadStructure(), denoptim.fragmenter.FragmenterTools.manageFragmentCollection(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.fragmenter.ConformerExtractorTaskTest.testExtractClusterableFragments(), and denoptim.json.DENOPTIMgsonTest.testMolecularFragmentSerialization().
IAtomContainer denoptim.graph.Fragment.getIAtomContainer | ( | Logger | logger, |
Randomizer | rng, | ||
boolean | removeUsedRCAs, | ||
boolean | rebuild | ||
) |
Although this type of vertex contains atoms, its content is fixed.
So, there is no need to regenerate its chemical representation. Accordingly, this method is ignoring all the parameters and calling getIAtomContainer()
Reimplemented from denoptim.graph.Vertex.
Definition at line 814 of file Fragment.java.
References denoptim.graph.Fragment.getIAtomContainer().
DefaultUndirectedGraph< FragIsomorphNode, FragIsomorphEdge > denoptim.graph.Fragment.getJGraphFragIsomorphism | ( | ) |
Creates a graph representation of this fragment where both atoms and AttachmentPoint
s are represented as nodes, and edges are either bonds or atom-to-attachment point connections.
Note that dummy atoms meant to heal linearities ({@value DENOPTIMConstants::DUMMYATMSYMBOL} with only one connected neighbor) are ignored.
Definition at line 996 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.DUMMYATMSYMBOL, denoptim.graph.Fragment.getAttachmentPoints(), denoptim.utils.MoleculeUtils.getSymbolOrLabel(), denoptim.graph.Fragment.jGraphFragIsomorphism, and denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.FragmentIsomorphismInspector.FragmentIsomorphismInspector(), denoptim.fragmenter.ClusterableFragment.getJGraphFragIsomorphism(), and denoptim.fragmenter.ClusterableFragment.setNaturalNodeOrder().
List< Vertex > denoptim.graph.Fragment.getMutationSites | ( | List< MutationType > | ignoredTypes | ) |
A list of mutation sites from within this vertex.
ignoredTypes | a collection of mutation types to ignore. vertices that allow only ignored types of mutation will not be considered mutation sites. |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1164 of file Fragment.java.
References denoptim.graph.Vertex.getBuildingBlockType(), and denoptim.graph.Vertex.getMutationTypes().
List< SymmetricAPs > denoptim.graph.Fragment.getSymmetricAPSets | ( | ) |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1148 of file Fragment.java.
References denoptim.graph.Fragment.lstSymAPs.
Referenced by denoptim.graph.Fragment.clone(), denoptim.graph.FragmentTest.testClone(), denoptim.graph.VertexTest.testClone(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.graph.SymmetricAPsTest.testGetSameAsThis(), denoptim.json.DENOPTIMgsonTest.testMolecularFragmentSerialization(), and denoptim.graph.SymmetricAPsTest.testSameAs().
|
staticprivate |
Definition at line 239 of file Fragment.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.Fragment.atomsAreCompatible(), denoptim.graph.APClass.compareTo(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.AttachmentPoint.getAtomPositionNumber(), and denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.Fragment.Fragment(), and denoptim.graph.Fragment.updateSymmetryRelations().
int denoptim.graph.Fragment.indexOf | ( | IAtom | atom | ) |
Definition at line 850 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.gui.GUIVertexInspector.convertAtomToAP(), and denoptim.fragmenter.ClusterableFragment.getTransformedCopy().
boolean denoptim.graph.Fragment.is3D | ( | ) |
Checks if atoms and APs contained in this fragment have non-zero 3D coordinates.
Definition at line 195 of file Fragment.java.
References denoptim.graph.Fragment.atoms(), denoptim.utils.MathUtils.distance(), and denoptim.graph.Fragment.getAttachmentPoints().
Referenced by denoptim.gui.VertexViewPanel.loadFragmentToViewer().
boolean denoptim.graph.Fragment.isIsomorphicTo | ( | Vertex | other | ) |
Checks for isomorphism of the graph representation of this and another fragment.
The graph representation results from the combination of the molecular structure (atoms as nodes, bonds as edges of the graph) and the presence of attachment points (attachment points as nodes of the graph). See getJGraphFragIsomorphism()
for details. Does not consider three-dimensional features. Does not consider dummy atoms on linearities so, de facto, fragments can be isomorphic and have a different number of atoms and bonds.
other | the other building block to consider. |
true
if at least one isomorphism exists. Definition at line 1066 of file Fragment.java.
References denoptim.graph.Fragment.Fragment(), denoptim.graph.Fragment.getAttachmentPoints(), and denoptim.graph.FragmentIsomorphismInspector.isomorphismExists().
Referenced by denoptim.graph.DGraph.areApsUsedBySymmetricUsers(), denoptim.graph.FragmentTest.testIsomorphicInLinear(), and denoptim.graph.FragmentTest.testIsomorphicTo().
void denoptim.graph.Fragment.projectAPsToProperties | ( | ) |
Finds the DENOPTIMAttachmentPoint objects defined as properties of the atoms in this container, and defines the string-based molecular property used to print attachment points in SDF files.
Definition at line 693 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.APSTAG, denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.AttachmentPoint.getAPDefinitionsForSDF(), denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.Fragment.mol, and denoptim.graph.Vertex.setProperty().
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.Fragment.getIAtomContainer(), denoptim.io.DenoptimIOTest.testAppendToJSON(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty(), denoptim.io.DenoptimIOTest.testReadAllAPClasses(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.graph.Fragment.projectListAPToAtomProperties | ( | ) |
Takes the list of APs from the field of this class and projects the APs into properties of the IAtom
s.
This method does not update the symmetry relation between APs because it might have been read from file, which takes priority over recalculating it.
DENOPTIMException |
Definition at line 659 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.Fragment.lstAPs, and denoptim.graph.Fragment.mol.
Referenced by denoptim.graph.Fragment.clone(), denoptim.graph.Fragment.fromJson(), and denoptim.graph.Fragment.projectPropertyToAP().
void denoptim.graph.Fragment.projectPropertyToAP | ( | ) | throws DENOPTIMException |
Uses the molecular property defining attachment points to create the DENOPTIMAttachmentPoint objects in the Atom objects.
Does not overwrite existing APs in the atoms.
DENOPTIMException |
Definition at line 572 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.APSTAG, denoptim.graph.Vertex.getProperty(), and denoptim.graph.Fragment.projectPropertyToAP().
Referenced by denoptim.graph.Fragment.Fragment(), denoptim.graph.Fragment.projectPropertyToAP(), and denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty().
void denoptim.graph.Fragment.projectPropertyToAP | ( | String | allAtomsProp | ) | throws DENOPTIMException |
Uses a string formatted like the molecular property used for defining attachment points to create the DENOPTIMAttachmentPoint objects in the Atom objects.
Does not overwrite existing APs in the atoms.
allAtomsProp | the content of the molecular property. |
DENOPTIMException |
Definition at line 594 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.Fragment.lstAPs, denoptim.graph.Fragment.mol, denoptim.graph.Fragment.projectListAPToAtomProperties(), denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPAAP, denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPAPS, denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPATMS, and denoptim.graph.Fragment.updateSymmetryRelations().
void denoptim.graph.Fragment.removeAP | ( | AttachmentPoint | ap | ) |
Definition at line 433 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.Fragment.getAPCountOnAtom(), denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.Fragment.getAttachmentPoints(), denoptim.graph.Fragment.mol, and denoptim.graph.Fragment.updateSymmetryRelations().
void denoptim.graph.Fragment.removeAtom | ( | IAtom | atom | ) |
Definition at line 899 of file Fragment.java.
References denoptim.graph.Fragment.removeAtoms().
Referenced by denoptim.utils.MoleculeUtils.extractIACForSubgraph(), and denoptim.gui.GUIVertexInspector.removeAtoms().
void denoptim.graph.Fragment.removeAtoms | ( | Collection< IAtom > | atoms | ) |
Removes a list of atoms and updates the list of attachment points.
Use this method instead of removeAtom(IAtom)
to run the regeneration of the list of APs only once instead of for every atom deletion.
atoms | the atoms to remove. |
Definition at line 913 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.Fragment.atoms(), denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.Fragment.lstAPs, denoptim.graph.Fragment.mol, denoptim.graph.AttachmentPoint.setAtomPositionNumber(), and denoptim.graph.Fragment.updateSymmetryRelations().
Referenced by denoptim.fragmenter.FragmenterTools.fragmentation(), and denoptim.graph.Fragment.removeAtom().
IBond denoptim.graph.Fragment.removeBond | ( | IAtom | atom1, |
IAtom | atom2 | ||
) |
Definition at line 885 of file Fragment.java.
References denoptim.graph.Fragment.mol.
void denoptim.graph.Fragment.removeBond | ( | IBond | bond | ) |
Definition at line 892 of file Fragment.java.
References denoptim.graph.Fragment.mol.
IBond denoptim.graph.Fragment.removeBond | ( | int | position | ) |
Definition at line 878 of file Fragment.java.
References denoptim.graph.Fragment.mol.
Referenced by denoptim.utils.MoleculeUtils.extractIACForSubgraph(), and denoptim.gui.GUIVertexInspector.removeAtoms().
boolean denoptim.graph.Fragment.sameAs | ( | Fragment | other, |
StringBuilder | reason | ||
) |
Compares this and another fragment ignoring vertex IDs.
Ignores isomerism and geometric differences as it only considers the number of atoms and bonds.
other | |
reason | string builder used to build the message clarifying the reason for returning false . |
true
if the two vertices represent the same graph node even if the vertex IDs are different. Definition at line 967 of file Fragment.java.
References denoptim.graph.Fragment.containsAtoms(), denoptim.graph.Fragment.mol, and denoptim.graph.Vertex.sameVertexFeatures().
Referenced by denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass(), and denoptim.io.DenoptimIOTest.testIOMolFragment().
|
protected |
Reimplemented from denoptim.graph.Vertex.
Definition at line 1128 of file Fragment.java.
Referenced by denoptim.graph.Fragment.clone(), denoptim.graph.Fragment.Fragment(), denoptim.graph.FragmentTest.makeFragment(), and denoptim.graph.Fragment.updateSymmetryRelations().
String denoptim.graph.Fragment.toJson | ( | ) |
Produces a string that represents this vertex and that adheres to the JSON format.
Definition at line 1188 of file Fragment.java.
References denoptim.json.DENOPTIMgson.getWriter().
Referenced by denoptim.graph.FragmentIsomorphismInspector.getMappings(), denoptim.graph.FragmentIsomorphismInspector.isomorphismExists(), and denoptim.graph.VertexTest.testFromToJSON_minimal().
String denoptim.graph.Fragment.toString | ( | ) |
Produces a human readable, short string to represent the vertex by its vertex ID, building block ID (1-based), building block type, and level in the graph (if any).
This is the old syntax used up to version 2 for reporting a vertex in the string representation of a graph. Such notation cannot hold all the information needed to define a template, and is, therefore, obsolete. Use JSON format to serialize a graph that may contain templates.
Reimplemented from denoptim.graph.Vertex.
Definition at line 1111 of file Fragment.java.
References denoptim.graph.Vertex.getBuildingBlockId(), denoptim.graph.Vertex.getBuildingBlockType(), and denoptim.graph.Vertex.getVertexId().
void denoptim.graph.Fragment.updateAPs | ( | ) |
Changes the properties of each APs as to reflect the current atom list.
AttachmentPoint include the index of their source atom, and this method updates such indexes to reflect the current atom list. This method is needed upon reordering of the atom list.
Definition at line 511 of file Fragment.java.
References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, denoptim.graph.Fragment.getAPsFromAtom(), denoptim.graph.Fragment.mol, denoptim.graph.AttachmentPoint.setAtomPositionNumber(), and denoptim.graph.Fragment.updateSymmetryRelations().
Referenced by denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.graph.Fragment.getCurrentAPs(), denoptim.ga.EAUtils.makeGraphFromFragmentationOfMol(), and denoptim.gui.GUIVertexInspector.removeAtoms().
|
private |
Depends on an healthy list of attachment points with properly set pointers to the source atoms.
Definition at line 231 of file Fragment.java.
References denoptim.graph.Fragment.getAttachmentPoints(), denoptim.graph.Fragment.identifySymmetryRelatedAPSets(), denoptim.graph.Fragment.mol, and denoptim.graph.Fragment.setSymmetricAPSets().
Referenced by denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.projectPropertyToAP(), denoptim.graph.Fragment.removeAP(), denoptim.graph.Fragment.removeAtoms(), and denoptim.graph.Fragment.updateAPs().
|
private |
jGraph representation used for detecting fragment isomorphism.
Definition at line 82 of file Fragment.java.
Referenced by denoptim.graph.Fragment.getJGraphFragIsomorphism().
|
private |
attachment points on this vertex
Definition at line 65 of file Fragment.java.
Referenced by denoptim.graph.Fragment.clone(), denoptim.graph.Fragment.getAttachmentPoints(), denoptim.graph.Fragment.getCurrentAPs(), denoptim.graph.Fragment.projectListAPToAtomProperties(), denoptim.graph.Fragment.projectPropertyToAP(), and denoptim.graph.Fragment.removeAtoms().
|
private |
List of AP sets that are related to each other, so that we call them "symmetric" (though symmetry is a fuzzy concept here).
Definition at line 71 of file Fragment.java.
Referenced by denoptim.graph.Fragment.getSymmetricAPSets().
|
private |
Molecular representation of this fragment.
Definition at line 76 of file Fragment.java.
Referenced by denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.addAPOnAtom(), denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.graph.Fragment.atoms(), denoptim.graph.Fragment.atomsAreCompatible(), denoptim.graph.Fragment.bonds(), denoptim.graph.Fragment.clone(), denoptim.graph.Fragment.containsAtoms(), denoptim.graph.Fragment.Fragment(), denoptim.graph.Fragment.getAPCountOnAtom(), denoptim.graph.Fragment.getAtom(), denoptim.graph.Fragment.getAtomCount(), denoptim.graph.Fragment.getAtomHoldingAP(), denoptim.graph.Fragment.getBondCount(), denoptim.graph.Fragment.getConnectedAtomsCount(), denoptim.graph.Fragment.getConnectedAtomsList(), denoptim.graph.Fragment.getCurrentAPs(), denoptim.graph.Fragment.getHeavyAtomsCount(), denoptim.graph.Fragment.getIAtomContainer(), denoptim.graph.Fragment.getJGraphFragIsomorphism(), denoptim.graph.Fragment.identifySymmetryRelatedAPSets(), denoptim.graph.Fragment.indexOf(), denoptim.graph.Fragment.projectAPsToProperties(), denoptim.graph.Fragment.projectListAPToAtomProperties(), denoptim.graph.Fragment.projectPropertyToAP(), denoptim.graph.Fragment.removeAP(), denoptim.graph.Fragment.removeAtoms(), denoptim.graph.Fragment.removeBond(), denoptim.graph.Fragment.sameAs(), denoptim.graph.Fragment.updateAPs(), and denoptim.graph.Fragment.updateSymmetryRelations().