$darkmode
DENOPTIM
denoptim.graph.Fragment Class Reference

Class representing a continuously connected portion of chemical object holding attachment points. More...

Inheritance diagram for denoptim.graph.Fragment:
[legend]
Collaboration diagram for denoptim.graph.Fragment:
[legend]

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< AttachmentPointgetAPsFromAtom (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< AttachmentPointgetCurrentAPs ()
 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 IAtoms. 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, FragIsomorphEdgegetJGraphFragIsomorphism ()
 Creates a graph representation of this fragment where both atoms and AttachmentPoints 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< AttachmentPointgetAttachmentPoints ()
 
List< SymmetricAPsgetSymmetricAPSets ()
 
List< VertexgetMutationSites (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< AttachmentPointgetAttachmentPoints ()
 
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< SymmetricAPsgetSymmetricAPSets ()
 
SymmetricAPs getSymmetricAPs (AttachmentPoint ap)
 For the given attachment point index locate the symmetric partners i.e. More...
 
int getNumberOfAPs ()
 
int getFreeAPCount ()
 
ArrayList< AttachmentPointgetFreeAPThroughout ()
 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< AttachmentPointgetCappedAPs ()
 Gets attachment points that are used by capping groups. More...
 
ArrayList< AttachmentPointgetCappedAPsThroughout ()
 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< APClassgetAllAPClasses ()
 Returns the list of all APClasses present on this vertex. More...
 
ArrayList< APClassgetAllAvailableAPClasses ()
 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< VertexgetMutationSites ()
 A list of mutation sites from within this vertex. More...
 
abstract List< VertexgetMutationSites (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< MutationTypegetMutationTypes ()
 Returns the list of mutation types. More...
 
List< MutationTypegetMutationTypes (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< AttachmentPointgetAPsFromChildren ()
 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< VertexgetChildrenThroughout ()
 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< VertexgetChilddren ()
 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< MutationTypegetUnfilteredMutationTypes ()
 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< SymmetricAPsidentifySymmetryRelatedAPSets (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< AttachmentPointlstAPs
 attachment points on this vertex More...
 
List< SymmetricAPslstSymAPs
 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, FragIsomorphEdgejGraphFragIsomorphism
 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...
 

Detailed Description

Class representing a continuously connected portion of chemical object holding attachment points.

Author
Marco Foscato

Definition at line 60 of file Fragment.java.

Constructor & Destructor Documentation

◆ Fragment() [1/5]

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().

Here is the caller graph for this function:

◆ Fragment() [2/5]

denoptim.graph.Fragment.Fragment ( long  vertexId)

Constructor for a molecular fragment kind of vertex.

Parameters
vertexIdunique identified of the vertex

Definition at line 107 of file Fragment.java.

References denoptim.graph.Vertex.VertexType.MolecularFragment, and denoptim.graph.Vertex.vertexId.

◆ Fragment() [3/5]

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!

Parameters
lthe identifier of the vertex to construct
molthe molecular representation
Exceptions
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().

Here is the call graph for this function:

◆ Fragment() [4/5]

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.

Here is the call graph for this function:

◆ Fragment() [5/5]

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!

Parameters
molthe molecular representation
Exceptions
DENOPTIMException

Definition at line 183 of file Fragment.java.

References denoptim.graph.Fragment.mol.

Member Function Documentation

◆ addAP() [1/4]

void denoptim.graph.Fragment.addAP ( int  atomPositionNumber)

Adds an attachment point with a dummy APClass.

Parameters
atomPositionNumberthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addAP() [2/4]

void denoptim.graph.Fragment.addAP ( int  atomPositionNumber,
APClass  apClass 
)

Adds an attachment point.

Parameters
atomPositionNumberthe index of the source atom (0-based)
apClassthe APClass

Definition at line 355 of file Fragment.java.

References denoptim.graph.Fragment.addAP().

Here is the call graph for this function:

◆ addAP() [3/4]

AttachmentPoint denoptim.graph.Fragment.addAP ( int  atomPositionNumber,
Point3d  dirVec,
APClass  apClass 
)

Adds an attachment point.

Parameters
atomPositionNumberthe index of the source atom (0-based)
dirVecthe AP direction vector end (the beginning at the coordinates of the source atom).
apClassthe APClass
Returns
the reference to the created AP.

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().

Here is the call graph for this function:

◆ addAP() [4/4]

void denoptim.graph.Fragment.addAP ( int  srcAtmId,
APClass  apc,
Point3d  vector 
)

Add an attachment point to the specifies atom.

Parameters
srcAtmIdthe index of the source atom in the atom list of this chemical representation. Index must be 0-based.
apcthe attachment point class, or null, if class should not be defines.
vectorthe 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.
valencethe valences used by this AP.

Definition at line 404 of file Fragment.java.

References denoptim.graph.Fragment.addAPOnAtom(), and denoptim.graph.Fragment.mol.

Here is the call graph for this function:

◆ addAPOnAtom()

AttachmentPoint denoptim.graph.Fragment.addAPOnAtom ( IAtom  srcAtm,
APClass  apc,
Point3d  vector 
)

Add an attachment point to the specifies atom.

Parameters
srcAtmthe source atom in the atom list of this chemical representation.
apcthe attachment point class, or null, if class should not be defines.
vectorthe 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.
Returns
the reference to the created AP.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addAtom()

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().

Here is the caller graph for this function:

◆ addBond()

◆ addSymmetricAPSet()

void denoptim.graph.Fragment.addSymmetricAPSet ( SymmetricAPs  symAPs)
protected

Reimplemented from denoptim.graph.Vertex.

Definition at line 1136 of file Fragment.java.

◆ atoms()

◆ atomsAreCompatible()

static boolean denoptim.graph.Fragment.atomsAreCompatible ( IAtomContainer  mol,
int  a1,
int  a2 
)
staticprivate

Checks if the atoms at the given positions have similar environments i.e.

are similar in atom types etc.

Parameters
mol
a1atom position
a2atom position
Returns
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().

Here is the caller graph for this function:

◆ bonds()

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().

Here is the caller graph for this function:

◆ clone()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ containsAtoms()

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().

Here is the caller graph for this function:

◆ fromJson()

static Fragment denoptim.graph.Fragment.fromJson ( String  json)
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.

Parameters
jsonthe string to parse.
Returns
a new instance of this class.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAPCountOnAtom() [1/2]

int denoptim.graph.Fragment.getAPCountOnAtom ( IAtom  srcAtm)

Returns the number of APs currently defined on a specific atom source.

Parameters
srcAtmthe source atom
Returns
the number of APs
Exceptions
DENOPTIMException

Definition at line 490 of file Fragment.java.

References denoptim.constants.DENOPTIMConstants.ATMPROPAPS, and denoptim.graph.Fragment.getAPsFromAtom().

Here is the call graph for this function:

◆ getAPCountOnAtom() [2/2]

int denoptim.graph.Fragment.getAPCountOnAtom ( int  srcAtmId)

Returns the number of APs currently defined on a specific atom source.

Parameters
srcAtmIdthe index of the atom
Returns
the number of APs
Exceptions
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAPsFromAtom()

◆ getAtom()

◆ getAtomCount()

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().

Here is the caller graph for this function:

◆ getAtomHoldingAP()

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.

Parameters
apthe attachment point to find the source of.
Returns
the source atom of the attachment point, or null is the attachment point does not belong to this vertex.

Definition at line 1234 of file Fragment.java.

References denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.AttachmentPoint.getOwner(), and denoptim.graph.Fragment.mol.

Here is the call graph for this function:

◆ getAttachmentPoints()

◆ getBondCount()

int denoptim.graph.Fragment.getBondCount ( )

Definition at line 864 of file Fragment.java.

References denoptim.graph.Fragment.mol.

◆ getConnectedAtomsCount()

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().

Here is the caller graph for this function:

◆ getConnectedAtomsList()

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().

Here is the caller graph for this function:

◆ getCurrentAPs()

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!

Returns
the list of APs. Note that these APs cannot respond to changes in 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHeavyAtomsCount()

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.

Here is the call graph for this function:

◆ getIAtomContainer() [1/2]

IAtomContainer denoptim.graph.Fragment.getIAtomContainer ( )

◆ getIAtomContainer() [2/2]

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().

Here is the call graph for this function:

◆ getJGraphFragIsomorphism()

DefaultUndirectedGraph< FragIsomorphNode, FragIsomorphEdge > denoptim.graph.Fragment.getJGraphFragIsomorphism ( )

Creates a graph representation of this fragment where both atoms and AttachmentPoints 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.

Returns
the graph.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMutationSites()

List< Vertex > denoptim.graph.Fragment.getMutationSites ( List< MutationType ignoredTypes)

A list of mutation sites from within this vertex.

Parameters
ignoredTypesa collection of mutation types to ignore. vertices that allow only ignored types of mutation will not be considered mutation sites.
Returns
the list of vertices that allow any non-ignored mutation type.

Reimplemented from denoptim.graph.Vertex.

Definition at line 1164 of file Fragment.java.

References denoptim.graph.Vertex.getBuildingBlockType(), and denoptim.graph.Vertex.getMutationTypes().

Here is the call graph for this function:

◆ getSymmetricAPSets()

List< SymmetricAPs > denoptim.graph.Fragment.getSymmetricAPSets ( )

◆ identifySymmetryRelatedAPSets()

static List< SymmetricAPs > denoptim.graph.Fragment.identifySymmetryRelatedAPSets ( IAtomContainer  mol,
List< AttachmentPoint daps 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ indexOf()

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().

Here is the caller graph for this function:

◆ is3D()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isIsomorphicTo()

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.

Parameters
otherthe other building block to consider.
Returns
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectAPsToProperties()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectListAPToAtomProperties()

void denoptim.graph.Fragment.projectListAPToAtomProperties ( )

Takes the list of APs from the field of this class and projects the APs into properties of the IAtoms.

This method does not update the symmetry relation between APs because it might have been read from file, which takes priority over recalculating it.

Exceptions
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectPropertyToAP() [1/2]

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.

Exceptions
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectPropertyToAP() [2/2]

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.

Parameters
allAtomsPropthe content of the molecular property.
Exceptions
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().

Here is the call graph for this function:

◆ removeAP()

void denoptim.graph.Fragment.removeAP ( AttachmentPoint  ap)

◆ removeAtom()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Parameters
atomsthe 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeBond() [1/3]

IBond denoptim.graph.Fragment.removeBond ( IAtom  atom1,
IAtom  atom2 
)

Definition at line 885 of file Fragment.java.

References denoptim.graph.Fragment.mol.

◆ removeBond() [2/3]

void denoptim.graph.Fragment.removeBond ( IBond  bond)

Definition at line 892 of file Fragment.java.

References denoptim.graph.Fragment.mol.

◆ removeBond() [3/3]

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().

Here is the caller graph for this function:

◆ sameAs()

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.

Parameters
other
reasonstring builder used to build the message clarifying the reason for returning false.
Returns
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSymmetricAPSets()

void denoptim.graph.Fragment.setSymmetricAPSets ( List< SymmetricAPs sAPs)
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().

Here is the caller graph for this function:

◆ toJson()

String denoptim.graph.Fragment.toJson ( )

Produces a string that represents this vertex and that adheres to the JSON format.

Returns
the JSON format as a single string

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

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().

Here is the call graph for this function:

◆ updateAPs()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSymmetryRelations()

void denoptim.graph.Fragment.updateSymmetryRelations ( )
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().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ jGraphFragIsomorphism

DefaultUndirectedGraph<FragIsomorphNode,FragIsomorphEdge> denoptim.graph.Fragment.jGraphFragIsomorphism
private

jGraph representation used for detecting fragment isomorphism.

Definition at line 82 of file Fragment.java.

Referenced by denoptim.graph.Fragment.getJGraphFragIsomorphism().

◆ lstAPs

◆ lstSymAPs

List<SymmetricAPs> denoptim.graph.Fragment.lstSymAPs
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().

◆ mol


The documentation for this class was generated from the following file: