$darkmode
DENOPTIM
denoptim.fragmenter.ClusterableFragment Class Reference

Represents a fragment that can be clustered based on the 3*N coordinate of atoms and attachment points, i.e., N is the sum of atoms and attachment points. More...

Inheritance diagram for denoptim.fragmenter.ClusterableFragment:
[legend]
Collaboration diagram for denoptim.fragmenter.ClusterableFragment:
[legend]

Public Member Functions

 ClusterableFragment (Fragment frag)
 Constructor. More...
 
void setOrderOfNodes (Collection< FragIsomorphNode > c)
 Sets the order of nodes (i.e., atoms/APs) to use for geometric comparison with other fragments, and update the vector of coordinates accordingly. More...
 
void setNaturalNodeOrder ()
 Define the node order from the list of atoms and attachment points. More...
 
double[] getPoint ()
 
List< FragIsomorphNodegetOrderedNodes ()
 Get the ordered list of nodes representing each either an atom or an attachment point is the alignment of fragments. More...
 
ClusterableFragment clone ()
 Returns a shallow copy where the vector of coordinates has a new reference. More...
 
Fragment getTransformedCopy ()
 

Static Public Member Functions

static double[] convertToCoordsVector (Point3d[] pts)
 Converts an array of 3-dimensional points in a vector of coordinates in 3*N-dimensional space where coordinated are ordered as [x1, y1, z1, x2, y2, z2, ...]. More...
 
static Point3d[] convertToPointArray (double[] coords)
 Converts an array of 3*N-dimensional coordinates into an array of 3-dimensional points assuming coordinated are ordered as [x1, y1, z1, x2, y2, z2, ...]. More...
 

Protected Member Functions

void setCoordsVector (double[] coords)
 Sets the coordinates of each atom and attachment point in this object. More...
 
void setCoordsVector (Point3d[] pts)
 Sets the coordinates of each atom and attachment point in this object. More...
 
Fragment getOriginalFragment ()
 The original fragment used to construct an instance of this object. More...
 
DefaultUndirectedGraph< FragIsomorphNode, FragIsomorphEdgegetJGraphFragIsomorphism ()
 

Package Attributes

double[] allCoords
 Ordered list of coordinated reflecting the ordered list of atoms/APs. More...
 

Private Attributes

Fragment frag
 Reference to original fragment. More...
 
List< FragIsomorphNodeorderedNodes
 Ordered list of nodes determined by isomorphism. More...
 

Detailed Description

Represents a fragment that can be clustered based on the 3*N coordinate of atoms and attachment points, i.e., N is the sum of atoms and attachment points.

Note that dummy atoms meant to break linearities (i.e., {@value DENOPTIMConstants::DUMMYATMSYMBOL} with only one connected neighbor) are not part of the pool of N points.

Definition at line 28 of file ClusterableFragment.java.

Constructor & Destructor Documentation

◆ ClusterableFragment()

denoptim.fragmenter.ClusterableFragment.ClusterableFragment ( Fragment  frag)

Constructor.

Does not set the ordering of the atoms/APs. For that use setOrderOfNodes(Collection).

Parameters
fragthe fragment to wrap.

Definition at line 52 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.frag.

Referenced by denoptim.fragmenter.ClusterableFragment.clone().

Here is the caller graph for this function:

Member Function Documentation

◆ clone()

ClusterableFragment denoptim.fragmenter.ClusterableFragment.clone ( )

Returns a shallow copy where the vector of coordinates has a new reference.

Thus, changes to the clone's coordinates vector do not affect the original.

Definition at line 247 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.clone(), denoptim.fragmenter.ClusterableFragment.ClusterableFragment(), denoptim.fragmenter.ClusterableFragment.orderedNodes, and denoptim.fragmenter.ClusterableFragment.setOrderOfNodes().

Referenced by denoptim.fragmenter.DynamicCentroidCluster.addPoint(), denoptim.fragmenter.ClusterableFragment.clone(), and denoptim.fragmenter.DynamicCentroidCluster.DynamicCentroidCluster().

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

◆ convertToCoordsVector()

static double[] denoptim.fragmenter.ClusterableFragment.convertToCoordsVector ( Point3d[]  pts)
static

Converts an array of 3-dimensional points in a vector of coordinates in 3*N-dimensional space where coordinated are ordered as [x1, y1, z1, x2, y2, z2, ...].

Parameters
ptspoints in 3-dimensional space.
Returns
vector in N-dimensional space

Definition at line 206 of file ClusterableFragment.java.

Referenced by denoptim.fragmenter.ClusterableFragment.setCoordsVector().

Here is the caller graph for this function:

◆ convertToPointArray()

static Point3d[] denoptim.fragmenter.ClusterableFragment.convertToPointArray ( double[]  coords)
static

Converts an array of 3*N-dimensional coordinates into an array of 3-dimensional points assuming coordinated are ordered as [x1, y1, z1, x2, y2, z2, ...].

Parameters
coordsthe N-dimensional array.
Returns
the array of points in 3-dimensional space.

Definition at line 228 of file ClusterableFragment.java.

Referenced by denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), denoptim.fragmenter.FragmentClusterer.mergeClusters(), and denoptim.fragmenter.FragmentClustererTest.testCluster().

Here is the caller graph for this function:

◆ getJGraphFragIsomorphism()

DefaultUndirectedGraph< FragIsomorphNode, FragIsomorphEdge > denoptim.fragmenter.ClusterableFragment.getJGraphFragIsomorphism ( )
protected
Returns
the graph representation of the original fragment used to construct an instance of this object.

Definition at line 165 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.frag, and denoptim.graph.Fragment.getJGraphFragIsomorphism().

Referenced by denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments().

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

◆ getOrderedNodes()

List< FragIsomorphNode > denoptim.fragmenter.ClusterableFragment.getOrderedNodes ( )

Get the ordered list of nodes representing each either an atom or an attachment point is the alignment of fragments.

@returnthe ordered list of nodes representing each either an atom or an attachment point is the alignment of fragments.

Definition at line 192 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.orderedNodes.

Referenced by denoptim.fragmenter.ClusterableFragmentTest.testSetNaturalNodeOrder().

Here is the caller graph for this function:

◆ getOriginalFragment()

Fragment denoptim.fragmenter.ClusterableFragment.getOriginalFragment ( )
protected

The original fragment used to construct an instance of this object.

Returns

Definition at line 153 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.frag.

◆ getPoint()

double[] denoptim.fragmenter.ClusterableFragment.getPoint ( )
Returns
the vector of 3*N coordinates, if the ordering has been set by setOrderOfNodes(Collection) if the vector of coordinates has been set by setCoordsVector(double[]), or null if neither has happened.

Definition at line 179 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.allCoords.

Referenced by denoptim.fragmenter.DynamicCentroidCluster.getCentroid(), denoptim.fragmenter.DynamicCentroidCluster.getNearestToCentroid(), denoptim.fragmenter.FragmentClusterer.mergeClusters(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetCentroid(), and denoptim.fragmenter.DynamicCentroidClusterTest.testGetNearestToCentroid().

Here is the caller graph for this function:

◆ getTransformedCopy()

Fragment denoptim.fragmenter.ClusterableFragment.getTransformedCopy ( )
Returns
a copy of the original fragment where the coordinates of each atom and attachment point have been transformed to reflect the content of the N-dimensional vector of coordinate of this class.

Definition at line 261 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.allCoords, denoptim.graph.Fragment.clone(), denoptim.fragmenter.ClusterableFragment.convertToPointArray(), denoptim.fragmenter.ClusterableFragment.frag, denoptim.graph.Vertex.getAP(), denoptim.graph.Fragment.getAtom(), denoptim.graph.Vertex.getIndexOfAP(), denoptim.graph.Fragment.indexOf(), and denoptim.graph.AttachmentPoint.setDirectionVector().

Referenced by denoptim.fragmenter.FragmentClusterer.getClusterCentroids(), denoptim.fragmenter.FragmentClusterer.getNearestToClusterCentroids(), and denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy().

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

◆ setCoordsVector() [1/2]

void denoptim.fragmenter.ClusterableFragment.setCoordsVector ( double[]  coords)
protected

Sets the coordinates of each atom and attachment point in this object.

Does not change the values in the original fragment used to construct an instance of this object.

Parameters
coordsthe 3*N-dimensional coordinates.

Definition at line 129 of file ClusterableFragment.java.

Referenced by denoptim.fragmenter.DynamicCentroidCluster.getCentroid(), and denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy().

Here is the caller graph for this function:

◆ setCoordsVector() [2/2]

void denoptim.fragmenter.ClusterableFragment.setCoordsVector ( Point3d[]  pts)
protected

Sets the coordinates of each atom and attachment point in this object.

Does not change the values in the original fragment used to construct an instance of this object.

Parameters
ptsthe N point in 3-dimensional space.

Definition at line 142 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.convertToCoordsVector().

Here is the call graph for this function:

◆ setNaturalNodeOrder()

void denoptim.fragmenter.ClusterableFragment.setNaturalNodeOrder ( )

Define the node order from the list of atoms and attachment points.

This method is useful to bypass the finding of a consistent node order via detection of the graph isomorphism. Note that dummy atoms meant to break linearities are not included in the order. In fact, they do not have a corresponding FragIsomorphNode in the graph generated by Fragment#getJGraphFragIsomorphism()

Definition at line 91 of file ClusterableFragment.java.

References denoptim.graph.Fragment.atoms(), denoptim.fragmenter.ClusterableFragment.frag, denoptim.graph.Fragment.getAttachmentPoints(), denoptim.graph.Fragment.getJGraphFragIsomorphism(), and denoptim.fragmenter.ClusterableFragment.setOrderOfNodes().

Referenced by denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.fragmenter.FragmentClustererTest.testCluster2(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetCentroid(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetNearestToCentroid(), denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy(), and denoptim.fragmenter.ClusterableFragmentTest.testSetNaturalNodeOrder().

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

◆ setOrderOfNodes()

void denoptim.fragmenter.ClusterableFragment.setOrderOfNodes ( Collection< FragIsomorphNode c)

Sets the order of nodes (i.e., atoms/APs) to use for geometric comparison with other fragments, and update the vector of coordinates accordingly.

Parameters
cthe new order.

Definition at line 64 of file ClusterableFragment.java.

References denoptim.fragmenter.ClusterableFragment.allCoords, and denoptim.fragmenter.ClusterableFragment.orderedNodes.

Referenced by denoptim.fragmenter.ClusterableFragment.clone(), denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments(), and denoptim.fragmenter.ClusterableFragment.setNaturalNodeOrder().

Here is the caller graph for this function:

Member Data Documentation

◆ allCoords

double [] denoptim.fragmenter.ClusterableFragment.allCoords
package

◆ frag

◆ orderedNodes

List<FragIsomorphNode> denoptim.fragmenter.ClusterableFragment.orderedNodes
private

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