$darkmode
DENOPTIM
denoptim.graph.AttachmentPoint Class Reference

An attachment point (AP) is a possibility to attach a Vertex onto the vertex holding the AP (i.e., the owner of the AP), this way forming a new Edge (i.e., the user of the AP). More...

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

Public Member Functions

 AttachmentPoint (Vertex owner)
 Constructor for undefined DENOPTIMAttachmentPoint. More...
 
 AttachmentPoint (Vertex owner, int atomPositionNumber)
 Constructor. More...
 
 AttachmentPoint (Vertex owner, int atomPosNum, APClass apClass)
 Constructor. More...
 
 AttachmentPoint (Vertex owner, int atomPosNum, Point3d dirVec, APClass apClass)
 Constructor. More...
 
 AttachmentPoint (Vertex owner, String str) throws DENOPTIMException
 Construct an attachment point based on the formatted string representation. More...
 
int getID ()
 Returns a unique integer that is used to sort list of attachment points. More...
 
void setID (int id)
 Sets the unique integer that is used to sort list of attachment points. More...
 
int getAtomPositionNumber ()
 The index of the source atom in the atom list of the fragment. More...
 
void setAtomPositionNumber (int atomPositionNumber)
 Set the index of the source atom in the list of atoms of the fragment. More...
 
int getAtomPositionNumberInMol ()
 The index of the source atom in the atom list of the entire molecule. More...
 
void setAtomPositionNumberInMol (int atomPositionNumberInMol)
 Set the index of the source atom in the list of atoms of the entire molecule. More...
 
BondType getBondType ()
 Returns the bond type preferred by this attachment point as defined by the APClass, or null if APClass is null. More...
 
void setDirectionVector (Point3d dirVec)
 Sets the end of the 3D vector defining the direction of the AP in 3D. More...
 
void setAPClass (String apClass) throws DENOPTIMException
 Set the Attachment Point class. More...
 
void setAPClass (APClass apClass)
 Set the Attachment Point class. More...
 
APClass getAPClass ()
 Returns the Attachment Point class. More...
 
Point3d getDirectionVector ()
 Returns the end of the direction vector. More...
 
int getCutId ()
 
void setCutId (int id)
 
boolean isAvailable ()
 Check availability of this attachment point. More...
 
boolean isAvailableThroughout ()
 Check availability of this attachment point throughout the graph level, i.e., check also across the inner graph template boundary. More...
 
boolean isClassEnabled ()
 Checks if this attachment point respects the APClass-based approach. More...
 
int compareTo (AttachmentPoint other)
 Compares this and another attachment points based on their unique identifier. More...
 
int comparePropertiesTo (AttachmentPoint other)
 Compares this and given attachment point. More...
 
boolean sameAs (AttachmentPoint other)
 Compares the features of this and another attachment point and decides if the two are same. More...
 
boolean sameAs (AttachmentPoint other, StringBuilder reason)
 Compares the features of this and another attachment point and decides if the two are same. More...
 
AttachmentPoint clone ()
 Returns a deep clone of this attachment point. More...
 
String getSingleAPStringSDF (boolean isFirst, int srcAtmID)
 Prepare a string for writing this AP in a fragment SDF file. More...
 
String getSingleAPStringSDF (boolean isFirst)
 Prepare a string for writing this AP in a fragment SDF file. More...
 
String toStringNoId ()
 Produces a string with the information included in this object. More...
 
String toString ()
 Produces a string with the information included in this object. More...
 
void setOwner (Vertex owner)
 Sets the reference to the vertex that owns this attachment point. More...
 
Vertex getOwner ()
 
void setUser (Edge edge)
 Sets the reference to the edge that is using this attachment point. More...
 
Edge getEdgeUser ()
 Gets the edge that is using this AP, or null if no edge is using this AP. More...
 
Edge getEdgeUserThroughout ()
 Gets the edge that is using this AP, or null if no edge is using this AP. More...
 
AttachmentPoint getEmbeddedAP ()
 For vertices that are templates this method returns the attachment point that is embedded in the template's inner graph. More...
 
AttachmentPoint getLinkedAP ()
 Gets the attachment point (AP) that is connected to this AP via the edge user. More...
 
AttachmentPoint getLinkedAPThroughout ()
 Gets the attachment point (AP) that is connected to this AP via the edge user or in any edge user that might be external to the template embedding the graph where this AP is directly reachable. More...
 
boolean isSrcInUserThroughout ()
 Checks the role of this AP in the user or in any user that might be external to the template embedding the graph where this AP is directly reachable. More...
 
boolean isSrcInUser ()
 Checks the role of this AP in the user. More...
 
int getIndexInOwner ()
 
boolean hasSameSrcAtom (AttachmentPoint other)
 
boolean hasConnectedSrcAtom (AttachmentPoint other)
 Checks if this and another APs are rooted on atoms that are bonded in any way other than a possible connection resulting by an edge made in between this and the other AP. More...
 
Map< Object, Object > getProperties ()
 
Object getProperty (Object description)
 
void setProperty (Object key, Object property)
 

Static Public Member Functions

static Object[] processSdfString (String str) throws DENOPTIMException
 Parses the string format used to record one attachment point in SDF files. More...
 
static String getAPDefinitionsForSDF (LinkedHashMap< Integer, List< AttachmentPoint > > apsPerIndex)
 Prepares the two strings that can be used to define AttachmentPoints in SDF files. More...
 

Private Member Functions

 AttachmentPoint (Vertex owner, int atomPositionNumber, Point3d dirVec)
 Constructor. More...
 

Private Attributes

int id
 Index used to keep the order in a list of attachment points. More...
 
int atomPositionNumber = -1
 The index of the source atom in the atom list of the fragment (0-based) More...
 
int atomPositionNumberInMol = -1
 The index of the source atom in the atom list of the entire molecule (0-based) More...
 
APClass apClass
 The attachment point class. More...
 
Point3d dirVec
 The direction vector representing the bond direction. More...
 
Vertex owner
 The vertex to which this AP is attached to. More...
 
Edge user
 The edge that is using this AP, if any. More...
 
int cutId
 Identifier of the cut operation that generated this AP. More...
 
Map< Object, Object > properties
 Map of customisable properties. More...
 

Detailed Description

An attachment point (AP) is a possibility to attach a Vertex onto the vertex holding the AP (i.e., the owner of the AP), this way forming a new Edge (i.e., the user of the AP).

It can be annotated with the index (position) of an atom in the molecule, which is called the attachment point's source atom, three-dimensional information in the form of Cartesian coordinates, and information on the kind of attachment point in terms of APClass.

Author
Vishwesh Venkatraman
Marco Foscato

Definition at line 52 of file AttachmentPoint.java.

Constructor & Destructor Documentation

◆ AttachmentPoint() [1/6]

denoptim.graph.AttachmentPoint.AttachmentPoint ( Vertex  owner)

Constructor for undefined DENOPTIMAttachmentPoint.

Parameters
ownerthe vertex that holds the attachment point under creation.

Definition at line 107 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.owner.

Referenced by denoptim.graph.AttachmentPoint.clone().

Here is the caller graph for this function:

◆ AttachmentPoint() [2/6]

denoptim.graph.AttachmentPoint.AttachmentPoint ( Vertex  owner,
int  atomPositionNumber 
)

Constructor.

Parameters
ownerthe vertex that holds the attachment point under creation.
atomPositionNumberthe index of the source atom (0-based)

Definition at line 119 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.atomPositionNumber, and denoptim.graph.AttachmentPoint.owner.

◆ AttachmentPoint() [3/6]

denoptim.graph.AttachmentPoint.AttachmentPoint ( Vertex  owner,
int  atomPositionNumber,
Point3d  dirVec 
)
private

Constructor.

Parameters
ownerthe vertex that holds the attachment point under creation.
atomPositionNumberthe index of the source atom (0-based)
dirVecthe AP direction vector end (the beginning are the coords of the source atom). This array must have 3 entries.

Definition at line 133 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.atomPositionNumber, denoptim.graph.AttachmentPoint.dirVec, and denoptim.graph.AttachmentPoint.owner.

◆ AttachmentPoint() [4/6]

denoptim.graph.AttachmentPoint.AttachmentPoint ( Vertex  owner,
int  atomPosNum,
APClass  apClass 
)

Constructor.

Parameters
ownerthe vertex that holds the attachment point under creation.
atomPosNumthe index of the source atom (0-based)
apClassthe APClass

Definition at line 156 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, and denoptim.graph.AttachmentPoint.owner.

◆ AttachmentPoint() [5/6]

denoptim.graph.AttachmentPoint.AttachmentPoint ( Vertex  owner,
int  atomPosNum,
Point3d  dirVec,
APClass  apClass 
)

Constructor.

Parameters
ownerthe vertex that holds the attachment point under creation.
atomPosNumthe index of the source atom (0-based)
dirVecthe AP direction vector end (the beginning at the coordinates of the source atom). This must array have 3 entries.
apClassthe APClass

Definition at line 178 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.AttachmentPoint.dirVec, denoptim.graph.Vertex.getUniqueAPIndex(), and denoptim.graph.AttachmentPoint.owner.

Here is the call graph for this function:

◆ AttachmentPoint() [6/6]

denoptim.graph.AttachmentPoint.AttachmentPoint ( Vertex  owner,
String  str 
) throws DENOPTIMException

Construct an attachment point based on the formatted string representation.

The format is the one used in SDF files.

Parameters
ownerthe vertex this AP is owned by.
strthe formatted string.
Exceptions
DENOPTIMException

Definition at line 200 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.owner, and denoptim.graph.AttachmentPoint.processSdfString().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

AttachmentPoint denoptim.graph.AttachmentPoint.clone ( )

Returns a deep clone of this attachment point.

Returns
a deep clone

Definition at line 719 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.AttachmentPoint.atomPositionNumber, denoptim.graph.AttachmentPoint.AttachmentPoint(), denoptim.graph.APClass.clone(), denoptim.graph.AttachmentPoint.dirVec, denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.AttachmentPoint.properties, and denoptim.graph.AttachmentPoint.setProperty().

Referenced by denoptim.graph.Template.addInnerToOuterAPMapping(), denoptim.graph.rings.PathSubGraph.findPath(), and denoptim.graph.AttachmentPointTest.testClone().

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

◆ comparePropertiesTo()

int denoptim.graph.AttachmentPoint.comparePropertiesTo ( AttachmentPoint  other)

Compares this and given attachment point.

This method defines how AttachmentPoints are sorted not by natural order, but by consistency of properties.

Parameters
other.
Returns
an integer that can be used by a comparator.

Definition at line 581 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.APClass.compareTo(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.AttachmentPoint.getDirectionVector(), and denoptim.graph.AttachmentPoint.sameAs().

Here is the call graph for this function:

◆ compareTo()

int denoptim.graph.AttachmentPoint.compareTo ( AttachmentPoint  other)

Compares this and another attachment points based on their unique identifier.

This is done to retain the order of attachment points when regenerating AP lists multiple times.

Parameters
otherthe attachment point to compare this with.
Returns
an integer that can be used by a comparator

Definition at line 567 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getID().

Referenced by denoptim.graph.AttachmentPointComparator.compare(), and denoptim.graph.AttachmentPointTest.testSameAs().

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

◆ getAPClass()

APClass denoptim.graph.AttachmentPoint.getAPClass ( )

Returns the Attachment Point class.

Returns
the APClass or null.

Definition at line 447 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass.

Referenced by denoptim.ga.GraphOperations.addRing(), denoptim.graph.rings.CyclicGraphHandler.checkChelatesGraph(), denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.graph.AttachmentPoint.comparePropertiesTo(), denoptim.ga.GraphOperations.extendGraph(), denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.fragspace.APMapFinder.findMappingCompatibileAPs(), denoptim.graph.FragIsomorphNode.FragIsomorphNode(), denoptim.ga.GraphOperations.getFrgApForSrcAp(), denoptim.ga.GraphOperations.getRCVForSrcAp(), denoptim.graph.Edge.getSrcAPClass(), denoptim.graph.Edge.getTrgAPClass(), denoptim.fragspace.GraphLinkFinder.GraphLinkFinder(), denoptim.graph.Fragment.identifySymmetryRelatedAPSets(), denoptim.graph.Template.isValidInnerGraph(), denoptim.gui.GraphViewerPanel.JEdge.JEdge(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.graph.simplified.Node.Node(), denoptim.gui.FragmentViewPanel.putAPsFromTableIntoIAtomContainer(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.replaceUnusedRCVsWithCapps(), denoptim.graph.AttachmentPoint.sameAs(), denoptim.graph.AttachmentPointTest.testClone(), denoptim.graph.TemplateTest.testClone(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass(), denoptim.graph.TemplateTest.testSameAPClass(), denoptim.graph.Edge.toString(), denoptim.graph.simplified.UndirectedEdge.UndirectedEdge(), and denoptim.graph.Template.updateInnerApID().

Here is the caller graph for this function:

◆ getAPDefinitionsForSDF()

static String denoptim.graph.AttachmentPoint.getAPDefinitionsForSDF ( LinkedHashMap< Integer, List< AttachmentPoint > >  apsPerIndex)
static

Prepares the two strings that can be used to define AttachmentPoints in SDF files.

Parameters
apsPerIndexa map of AttachmentPoints grouped by index. The index may or may not be an index of an existing atom (i.e., we do not use it as such, but we just place if in the text-representation of the AP. This index is supposed to be 0-based (i.e., in this method it is transformed in 1-based).
Returns
the string meant the be the value of the DENOPTIMConstants#APSTAG tag in SDF file.

Definition at line 1235 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getSingleAPStringSDF(), and denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPATMS.

Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.graph.Template.getIAtomContainer(), denoptim.graph.Fragment.projectAPsToProperties(), and denoptim.graph.Template.setIAtomContainer().

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

◆ getAtomPositionNumber()

◆ getAtomPositionNumberInMol()

int denoptim.graph.AttachmentPoint.getAtomPositionNumberInMol ( )

The index of the source atom in the atom list of the entire molecule.

The index is reported considering 0-based enumeration.

Returns
the index of the source atom in the atom list of the entire molecule

Definition at line 362 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.atomPositionNumberInMol, and denoptim.graph.AttachmentPoint.owner.

Referenced by denoptim.graph.Template.getIAtomContainer().

Here is the caller graph for this function:

◆ getBondType()

BondType denoptim.graph.AttachmentPoint.getBondType ( )

Returns the bond type preferred by this attachment point as defined by the APClass, or null if APClass is null.

Returns
the bond type preferred by this attachment point as defined by the APClass, or null if APClass is null.

Definition at line 390 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.APClass.DEFAULTBT, and denoptim.graph.APClass.getBondType().

Referenced by denoptim.graph.DGraph.clone(), denoptim.utils.GraphConversionTool.getJGraphFromGraph(), and denoptim.graph.DGraph.insertSingleVertex().

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

◆ getCutId()

int denoptim.graph.AttachmentPoint.getCutId ( )
Returns
the identifier of the cut operation that generated this AP.

Definition at line 469 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.cutId.

◆ getDirectionVector()

Point3d denoptim.graph.AttachmentPoint.getDirectionVector ( )

◆ getEdgeUser()

Edge denoptim.graph.AttachmentPoint.getEdgeUser ( )

Gets the edge that is using this AP, or null if no edge is using this AP.

Does NOT account for embedding of the vertex in a template, i.e., this AP can be available in the graph (if any) owning the vertex this AP belongs to, but if the graph is itself the inner graph of a template, the AP is then projected on the template's surface and might be used to make an edge that uses the template as a single vertex. This method considers only any edge user that belongs to the graph owning the vertex that own this AP, if any such owners exist. See AttachmentPoint#getEdgeUserThroughout() to crossing the template boundary.

Returns
the edge that is using this AP.

Definition at line 929 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.graph.DGraph.fixEdgeDirections(), denoptim.graph.Vertex.getEdgeWith(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.setScaffold(), denoptim.graph.AttachmentPointTest.testClone(), and denoptim.graph.EdgeTest.testConnectionDeconnectionLoop().

Here is the caller graph for this function:

◆ getEdgeUserThroughout()

Edge denoptim.graph.AttachmentPoint.getEdgeUserThroughout ( )

Gets the edge that is using this AP, or null if no edge is using this AP.

This method does account for embedding of the vertex in a template, i.e., this AP can be available in the graph (if any) owning the vertex this AP belongs to, but if the graph is itself the inner graph of a template, the AP is then projected on the template's surface and might be used to make an edge that uses the template as a single vertex. This method considers any level of template embedding. See AttachmentPoint#getEdgeUser() to remain within the template boundary.

Returns
the edge that is using this AP.

Definition at line 948 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getEdgeUserThroughout(), denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.Template.getOuterAPFromInnerAP(), denoptim.graph.AttachmentPoint.owner, denoptim.graph.DGraph.templateJacket, and denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.ga.GraphOperations.extendLink(), denoptim.graph.AttachmentPoint.getEdgeUserThroughout(), denoptim.graph.AttachmentPoint.getLinkedAPThroughout(), and denoptim.graph.AttachmentPoint.isSrcInUserThroughout().

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

◆ getEmbeddedAP()

AttachmentPoint denoptim.graph.AttachmentPoint.getEmbeddedAP ( )

For vertices that are templates this method returns the attachment point that is embedded in the template's inner graph.

Effectively, it returns the original object of which this object is a projection on the templates surface.

Returns
this attachment point (for vertices that are no templates) or the original attachment point this is a projection of (for templates).

Definition at line 975 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getEmbeddedAP(), and denoptim.graph.AttachmentPoint.owner.

Referenced by denoptim.graph.AttachmentPointTest.checkIdentityOfEmbeddedAP(), denoptim.graph.AttachmentPoint.getEmbeddedAP(), denoptim.graph.AttachmentPoint.getLinkedAPThroughout(), denoptim.graph.Edge.getSrcAPThroughout(), denoptim.graph.Edge.getTrgAPThroughout(), denoptim.graph.AttachmentPoint.hasConnectedSrcAtom(), and denoptim.graph.AttachmentPoint.hasSameSrcAtom().

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

◆ getID()

int denoptim.graph.AttachmentPoint.getID ( )

Returns a unique integer that is used to sort list of attachment points.

This index follows the order in which attachment points were generated.

Definition at line 312 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.id.

Referenced by denoptim.graph.AttachmentPoint.compareTo(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.gui.GraphViewerPanel.JVertex.JVertex(), denoptim.graph.Edge.DENOPTIMEdgeSerializer.serialize(), denoptim.graph.AttachmentPointTest.testClone(), and denoptim.graph.APMapping.toIntMappig().

Here is the caller graph for this function:

◆ getIndexInOwner()

int denoptim.graph.AttachmentPoint.getIndexInOwner ( )

◆ getLinkedAP()

AttachmentPoint denoptim.graph.AttachmentPoint.getLinkedAP ( )

Gets the attachment point (AP) that is connected to this AP via the edge user.

Returns
the AP linked with this AP, or null;

Definition at line 995 of file AttachmentPoint.java.

References denoptim.graph.Edge.getSrcAP(), denoptim.graph.Edge.getTrgAP(), and denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.graph.Vertex.getCappedAPs(), denoptim.graph.Vertex.getEdgeWith(), denoptim.graph.Template.removeProjectionOfInnerAP(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.replaceSingleSubGraph(), and denoptim.graph.AttachmentPointTest.testGetLinkedAP().

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

◆ getLinkedAPThroughout()

AttachmentPoint denoptim.graph.AttachmentPoint.getLinkedAPThroughout ( )

Gets the attachment point (AP) that is connected to this AP via the edge user or in any edge user that might be external to the template embedding the graph where this AP is directly reachable.

Note that the AP that is used in the edge might not be the deepest image of that AP, i.e., the AP returned by this method might be a projection of a more deeply embedded AP, which you can get by using the AttachmentPoint#getEmbeddedAP() method.

Returns
the AP linked with this AP, or null;

Definition at line 1022 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getEdgeUserThroughout(), denoptim.graph.AttachmentPoint.getEmbeddedAP(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.Edge.getSrcAPThroughout(), denoptim.graph.Edge.getTrgAP(), denoptim.graph.Edge.getTrgAPThroughout(), and denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.graph.DGraph.areApsUsedBySymmetricUsers(), denoptim.fragspace.APMapFinder.findMappingCompatibileAPs(), denoptim.graph.DGraph.findSymmetrySetsOfChildVertexes(), denoptim.graph.Vertex.getCappedAPsThroughout(), denoptim.graph.AttachmentPoint.hasConnectedSrcAtom(), and denoptim.graph.DGraph.removeSingleVertexAndWeld().

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

◆ getOwner()

Vertex denoptim.graph.AttachmentPoint.getOwner ( )

Definition at line 900 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.owner.

Referenced by denoptim.graph.DGraph.areApsUsedBySymmetricUsers(), denoptim.graph.DGraph.changeSignOfVertexID(), denoptim.graph.AttachmentPointTest.checkGetEdgeUserThroughput(), denoptim.graph.AttachmentPoint.clone(), denoptim.graph.Edge.compareAsUndirected(), denoptim.graph.DGraph.editGraph(), denoptim.gui.GUIGraphHandler.extendCurrentGraph(), denoptim.ga.GraphOperations.extendLink(), denoptim.graph.rings.PathSubGraph.findPath(), denoptim.graph.DGraph.findSymmetrySetsOfChildVertexes(), denoptim.graph.DGraph.fixEdgeDirections(), denoptim.graph.Fragment.getAtomHoldingAP(), denoptim.graph.Vertex.getCappedAPs(), denoptim.graph.Vertex.getCappedAPsThroughout(), denoptim.graph.Vertex.getChilddren(), denoptim.graph.Vertex.getChildrenThroughout(), denoptim.ga.EAUtils.getCrowdedness(), denoptim.ga.EAUtils.getCrowdingProbability(), denoptim.graph.Vertex.getEdgeWith(), denoptim.graph.Vertex.getParent(), denoptim.graph.DGraph.getParent(), denoptim.graph.Edge.getSrcAPID(), denoptim.graph.Edge.getSrcVertex(), denoptim.graph.Edge.getTrgAPID(), denoptim.graph.Edge.getTrgVertex(), denoptim.graph.AttachmentPoint.hasConnectedSrcAtom(), denoptim.graph.AttachmentPoint.hasSameSrcAtom(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.gui.GraphViewerPanel.JEdge.JEdge(), denoptim.gui.GraphViewerPanel.JVertex.JVertex(), denoptim.graph.simplified.UndirectedEdge.makeInvariant(), denoptim.graph.rings.PathSubGraph.PathSubGraph(), denoptim.ga.GraphOperations.performCrossover(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.Template.removeProjectionOfInnerAP(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.setScaffold(), denoptim.graph.AttachmentPointTest.testClone(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.APMapping.toIntMappig(), denoptim.graph.Edge.toString(), and denoptim.graph.simplified.UndirectedEdge.toString().

Here is the caller graph for this function:

◆ getProperties()

Map< Object, Object > denoptim.graph.AttachmentPoint.getProperties ( )

Definition at line 1184 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.properties.

◆ getProperty()

Object denoptim.graph.AttachmentPoint.getProperty ( Object  description)

Definition at line 1191 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.properties.

◆ getSingleAPStringSDF() [1/2]

String denoptim.graph.AttachmentPoint.getSingleAPStringSDF ( boolean  isFirst)

Prepare a string for writing this AP in a fragment SDF file.

Only DENOPTIM's format is currently supported and we assume three coordinates are used to define the direction vector.

Parameters
isFirstset true is this is the first AP among those on the same source atom. When you give false the atom ID and the first separator are omitted.
Returns
a string with APClass and coordinated of the AP direction vector

Definition at line 829 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getSingleAPStringSDF().

Here is the call graph for this function:

◆ getSingleAPStringSDF() [2/2]

String denoptim.graph.AttachmentPoint.getSingleAPStringSDF ( boolean  isFirst,
int  srcAtmID 
)

Prepare a string for writing this AP in a fragment SDF file.

Only DENOPTIM's format is currently supported and we assume three coordinates are used to define the direction vector.

Parameters
isFirstuse true if this is the first AP among those on the same source atom. When you give false the atom ID and the first separator are omitted.
srcAtmIDthe index to use to identify the source atom. Use this to write something different from what reported in {@Link DENOPTIMAttachmentPoint::atomPositionNumber}, or use negative value to ignore this argument.
Returns
a string with APClass and coordinated of the AP direction vector

Definition at line 789 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.AttachmentPoint.atomPositionNumber, denoptim.graph.AttachmentPoint.dirVec, denoptim.utils.GeneralUtils.getEnglishFormattedDecimal(), denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPAAP, denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPSCL, denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPXYZ, and denoptim.graph.APClass.toSDFString().

Referenced by denoptim.graph.AttachmentPoint.getAPDefinitionsForSDF(), denoptim.graph.AttachmentPoint.getSingleAPStringSDF(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFString(), and denoptim.graph.AttachmentPointTest.testConstructorsAndSDFStringNoDirVec().

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

◆ hasConnectedSrcAtom()

boolean denoptim.graph.AttachmentPoint.hasConnectedSrcAtom ( AttachmentPoint  other)

Checks if this and another APs are rooted on atoms that are bonded in any way other than a possible connection resulting by an edge made in between this and the other AP.

Parameters
otherthe other aP to consider.
Returns
true is the two APs are rooted on atoms that participate in a bond either within a molecular fragment or across a graph edge.

Definition at line 1128 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getEmbeddedAP(), denoptim.graph.AttachmentPoint.getLinkedAPThroughout(), and denoptim.graph.AttachmentPoint.getOwner().

Referenced by denoptim.graph.DGraph.removeVertexAndWeld(), and denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom().

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

◆ hasSameSrcAtom()

boolean denoptim.graph.AttachmentPoint.hasSameSrcAtom ( AttachmentPoint  other)

Definition at line 1093 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getEmbeddedAP(), and denoptim.graph.AttachmentPoint.getOwner().

Referenced by denoptim.graph.DGraph.removeVertexAndWeld(), and denoptim.graph.AttachmentPointTest.testHasSameSrcAtom().

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

◆ isAvailable()

boolean denoptim.graph.AttachmentPoint.isAvailable ( )

Check availability of this attachment point.

Does not account for embedding of the vertex in a template, i.e., this AP can be available in the graph owning the vertex this AP belongs to, but if the graph is itself the inner graph of a template, the AP might be projected on the template's surface and used to make an edge at that level. To account for such possibility use AttachmentPoint#isAvailableThroughout()

Returns
true if the attachment point has no user.

Definition at line 497 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.fragspace.FragmentSpace.classifyFragment(), denoptim.ga.GraphOperations.extendGraph(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.graph.Template.removeProjectionOfInnerAP(), and denoptim.graph.DGraph.replaceSingleSubGraph().

Here is the caller graph for this function:

◆ isAvailableThroughout()

boolean denoptim.graph.AttachmentPoint.isAvailableThroughout ( )

Check availability of this attachment point throughout the graph level, i.e., check also across the inner graph template boundary.

This method does account for embedding of the vertex in a template, i.e., this AP can be available in the graph owning the vertex this AP belongs to, but if the graph is itself the inner graph of a template, the AP is then projected on the template's surface and used to make an edge that uses the template as a single vertex. To ignore this possibility and consider only edges that belong to the graph owning the AP's vertex, use AttachmentPoint#isAvailable().

Returns
true if the attachment point has no user.

Definition at line 518 of file AttachmentPoint.java.

References denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.Template.getOuterAPFromInnerAP(), denoptim.graph.AttachmentPoint.isAvailableThroughout(), denoptim.graph.AttachmentPoint.owner, denoptim.graph.DGraph.templateJacket, and denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.fragspace.APMapFinder.findMappingCompatibileAPs(), and denoptim.graph.AttachmentPoint.isAvailableThroughout().

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

◆ isClassEnabled()

boolean denoptim.graph.AttachmentPoint.isClassEnabled ( )

Checks if this attachment point respects the APClass-based approach.

Returns
true if an APClass is defined.

Definition at line 552 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass.

◆ isSrcInUser()

boolean denoptim.graph.AttachmentPoint.isSrcInUser ( )

Checks the role of this AP in the user.

Returns
true if a user exists and this AP is the src AP in that edge. Otherwise, this method returns false without discriminating if this AP is free, i.e., the user is null, or this AP is the trg in the edge user.

Definition at line 1071 of file AttachmentPoint.java.

References denoptim.graph.Edge.getSrcAP(), and denoptim.graph.AttachmentPoint.user.

Referenced by denoptim.graph.AttachmentPointTest.testIsSrcInUser().

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

◆ isSrcInUserThroughout()

boolean denoptim.graph.AttachmentPoint.isSrcInUserThroughout ( )

Checks the role of this AP in the user or in any user that might be external to the template embedding the graph where this AP is directly reachable.

Returns
true if a user exists and this AP is the src AP in that edge. Otherwise, this method returns false without discriminating if this AP is free, i.e., the user is null, or this AP is the trg in the edge user.

Definition at line 1052 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getEdgeUserThroughout(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.Edge.getSrcAPThroughout(), and denoptim.graph.AttachmentPoint.user.

Here is the call graph for this function:

◆ processSdfString()

static Object[] denoptim.graph.AttachmentPoint.processSdfString ( String  str) throws DENOPTIMException
static

Parses the string format used to record one attachment point in SDF files.

Parameters
strthe string to parse
Returns
the array of attachment point features in this order
  1. atomPositionNumber
  2. APClass
  3. vector
Exceptions
DENOPTIMException

Definition at line 222 of file AttachmentPoint.java.

References denoptim.graph.APClass.make(), denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPAAP, denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPSCL, and denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPXYZ.

Referenced by denoptim.graph.AttachmentPoint.AttachmentPoint(), and denoptim.graph.AttachmentPointTest.testParsingofSdfAPString().

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

◆ sameAs() [1/2]

boolean denoptim.graph.AttachmentPoint.sameAs ( AttachmentPoint  other)

Compares the features of this and another attachment point and decides if the two are same.

Does not check hashcodes, so this is not an equals method.

Parameters
otherAP to compare with this AP.
Returns
true is the two APs have the same features.

Definition at line 664 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.sameAs().

Referenced by denoptim.graph.DGraph.areApsUsedBySymmetricUsers(), denoptim.graph.AttachmentPoint.comparePropertiesTo(), denoptim.graph.AttachmentPoint.sameAs(), denoptim.graph.Vertex.sameVertexFeatures(), denoptim.graph.AttachmentPointTest.testSameAs(), denoptim.graph.AttachmentPointTest.testSameAs_DiffAPClass(), and denoptim.graph.AttachmentPointTest.testSameAs_DiffSrcAtm().

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

◆ sameAs() [2/2]

boolean denoptim.graph.AttachmentPoint.sameAs ( AttachmentPoint  other,
StringBuilder  reason 
)

Compares the features of this and another attachment point and decides if the two are same.

Does not check hashcodes, so this is not an equals method.

Parameters
otherAP to compare with this AP.
reasonstring builder used to build the message clarifying the reason for returning false.
Returns
true if the two APs have the same features.

Definition at line 680 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.AttachmentPoint.getAtomPositionNumber(), and denoptim.graph.AttachmentPoint.getIndexInOwner().

Here is the call graph for this function:

◆ setAPClass() [1/2]

void denoptim.graph.AttachmentPoint.setAPClass ( APClass  apClass)

Set the Attachment Point class.

Parameters
apClassthe new APClass.

Definition at line 436 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass.

◆ setAPClass() [2/2]

void denoptim.graph.AttachmentPoint.setAPClass ( String  apClass) throws DENOPTIMException

Set the Attachment Point class.

The APClass is the combination of a main class (or "rule") and a subclass (or direction).

Parameters
apClassthe new APClass.

Definition at line 424 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, and denoptim.graph.APClass.make().

Referenced by denoptim.utils.GraphConversionTool.getGraphFromString(), denoptim.graph.TemplateTest.testSameAPClass(), denoptim.graph.AttachmentPointTest.testSameAs_DiffAPClass(), and denoptim.graph.Template.updateInnerApID().

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

◆ setAtomPositionNumber()

void denoptim.graph.AttachmentPoint.setAtomPositionNumber ( int  atomPositionNumber)

Set the index of the source atom in the list of atoms of the fragment.

The index should reflect 0-based enumeration.

Parameters
atomPositionNumberthe index

Definition at line 349 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.atomPositionNumber.

Referenced by denoptim.graph.Template.clone(), denoptim.graph.Fragment.removeAtoms(), and denoptim.graph.Fragment.updateAPs().

Here is the caller graph for this function:

◆ setAtomPositionNumberInMol()

void denoptim.graph.AttachmentPoint.setAtomPositionNumberInMol ( int  atomPositionNumberInMol)

Set the index of the source atom in the list of atoms of the entire molecule.

The index should reflect 0-based enumeration.

Parameters
atomPositionNumberInMolthe index

Definition at line 377 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.atomPositionNumberInMol.

◆ setCutId()

void denoptim.graph.AttachmentPoint.setCutId ( int  id)
Parameters
idthe identifier of the cut operation that generated this AP.

Definition at line 479 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.id.

Referenced by denoptim.graph.EmptyVertex.clone(), denoptim.graph.Fragment.clone(), and denoptim.fragmenter.FragmenterTools.fragmentation().

Here is the caller graph for this function:

◆ setDirectionVector()

void denoptim.graph.AttachmentPoint.setDirectionVector ( Point3d  dirVec)

Sets the end of the 3D vector defining the direction of the AP in 3D.

Note that the source of this vector is the source atom, and that the entries of dirVec are referred to the same origin as the coordinates of the source atom.

Parameters
dirVecthe coordinates of the 3D point defining the end of the direction vector.

Definition at line 408 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.dirVec.

Referenced by denoptim.graph.Template.clone(), denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), denoptim.graph.Template.setIAtomContainer(), and denoptim.graph.AttachmentPointTest.testClone().

Here is the caller graph for this function:

◆ setID()

void denoptim.graph.AttachmentPoint.setID ( int  id)

Sets the unique integer that is used to sort list of attachment points.

WARNING: we do not check for uniqueness of the given value.

Definition at line 323 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.id.

Referenced by denoptim.graph.EmptyVertex.clone(), and denoptim.graph.Fragment.clone().

Here is the caller graph for this function:

◆ setOwner()

void denoptim.graph.AttachmentPoint.setOwner ( Vertex  owner)

Sets the reference to the vertex that owns this attachment point.

This method should be used with caution as it has the capability of altering graphs!

Parameters
ownerthe vertex that own this attachment point.

Definition at line 894 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.owner.

Referenced by denoptim.graph.Template.addInnerToOuterAPMapping(), denoptim.graph.rings.PathSubGraph.findPath(), and denoptim.graph.Template.updateInnerToOuter().

Here is the caller graph for this function:

◆ setProperty()

void denoptim.graph.AttachmentPoint.setProperty ( Object  key,
Object  property 
)

Definition at line 1203 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.properties.

Referenced by denoptim.graph.AttachmentPoint.clone(), and denoptim.utils.MoleculeUtils.extractIACForSubgraph().

Here is the caller graph for this function:

◆ setUser()

void denoptim.graph.AttachmentPoint.setUser ( Edge  edge)

Sets the reference to the edge that is using this attachment point.

Parameters
edgethe user

Definition at line 910 of file AttachmentPoint.java.

Referenced by denoptim.graph.Edge.Edge(), and denoptim.graph.DGraph.removeEdge().

Here is the caller graph for this function:

◆ toString()

String denoptim.graph.AttachmentPoint.toString ( )

Produces a string with the information included in this object.

Returns
the string

Definition at line 867 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.AttachmentPoint.atomPositionNumber, and denoptim.graph.AttachmentPoint.dirVec.

Referenced by denoptim.gui.GraphViewerPanel.renumberAPs().

Here is the caller graph for this function:

◆ toStringNoId()

String denoptim.graph.AttachmentPoint.toStringNoId ( )

Produces a string with the information included in this object.

Returns
the string

Definition at line 841 of file AttachmentPoint.java.

References denoptim.graph.AttachmentPoint.apClass, denoptim.graph.AttachmentPoint.atomPositionNumber, and denoptim.graph.AttachmentPoint.dirVec.

Referenced by denoptim.graph.AttachmentPointTest.testConstructorsAndSDFStringNoDirVec().

Here is the caller graph for this function:

Member Data Documentation

◆ apClass

◆ atomPositionNumber

◆ atomPositionNumberInMol

int denoptim.graph.AttachmentPoint.atomPositionNumberInMol = -1
private

The index of the source atom in the atom list of the entire molecule (0-based)

Definition at line 68 of file AttachmentPoint.java.

Referenced by denoptim.graph.AttachmentPoint.getAtomPositionNumberInMol(), and denoptim.graph.AttachmentPoint.setAtomPositionNumberInMol().

◆ cutId

int denoptim.graph.AttachmentPoint.cutId
private

Identifier of the cut operation that generated this AP.

Definition at line 93 of file AttachmentPoint.java.

Referenced by denoptim.graph.AttachmentPoint.getCutId().

◆ dirVec

◆ id

int denoptim.graph.AttachmentPoint.id
private

Index used to keep the order in a list of attachment points.

Definition at line 57 of file AttachmentPoint.java.

Referenced by denoptim.graph.AttachmentPoint.getID(), denoptim.graph.AttachmentPoint.setCutId(), and denoptim.graph.AttachmentPoint.setID().

◆ owner

◆ properties

Map<Object, Object> denoptim.graph.AttachmentPoint.properties
private

◆ user


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