$darkmode
DENOPTIM
|
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...
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< FragIsomorphNode > | getOrderedNodes () |
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, FragIsomorphEdge > | getJGraphFragIsomorphism () |
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< FragIsomorphNode > | orderedNodes |
Ordered list of nodes determined by isomorphism. More... | |
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.
denoptim.fragmenter.ClusterableFragment.ClusterableFragment | ( | Fragment | frag | ) |
Constructor.
Does not set the ordering of the atoms/APs. For that use setOrderOfNodes(Collection)
.
frag | the fragment to wrap. |
Definition at line 52 of file ClusterableFragment.java.
References denoptim.fragmenter.ClusterableFragment.frag.
Referenced by denoptim.fragmenter.ClusterableFragment.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().
|
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, ...].
pts | points in 3-dimensional space. |
Definition at line 206 of file ClusterableFragment.java.
Referenced by denoptim.fragmenter.ClusterableFragment.setCoordsVector().
|
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, ...].
coords | the N-dimensional array. |
Definition at line 228 of file ClusterableFragment.java.
Referenced by denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), denoptim.fragmenter.FragmentClusterer.mergeClusters(), and denoptim.fragmenter.FragmentClustererTest.testCluster().
|
protected |
Definition at line 165 of file ClusterableFragment.java.
References denoptim.fragmenter.ClusterableFragment.frag, and denoptim.graph.Fragment.getJGraphFragIsomorphism().
Referenced by denoptim.fragmenter.ConformerExtractorTask.populateListOfClusterizableFragments().
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().
|
protected |
The original fragment used to construct an instance of this object.
Definition at line 153 of file ClusterableFragment.java.
References denoptim.fragmenter.ClusterableFragment.frag.
double[] denoptim.fragmenter.ClusterableFragment.getPoint | ( | ) |
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().
Fragment denoptim.fragmenter.ClusterableFragment.getTransformedCopy | ( | ) |
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().
|
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.
coords | the 3*N-dimensional coordinates. |
Definition at line 129 of file ClusterableFragment.java.
Referenced by denoptim.fragmenter.DynamicCentroidCluster.getCentroid(), and denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy().
|
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.
pts | the N point in 3-dimensional space. |
Definition at line 142 of file ClusterableFragment.java.
References denoptim.fragmenter.ClusterableFragment.convertToCoordsVector().
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().
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.
c | the 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().
|
package |
Ordered list of coordinated reflecting the ordered list of atoms/APs.
Definition at line 43 of file ClusterableFragment.java.
Referenced by denoptim.fragmenter.ClusterableFragment.getPoint(), denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), denoptim.fragmenter.ClusterableFragment.setOrderOfNodes(), and denoptim.fragmenter.FragmentClustererTest.testCluster().
|
private |
Reference to original fragment.
Definition at line 33 of file ClusterableFragment.java.
Referenced by denoptim.fragmenter.ClusterableFragment.ClusterableFragment(), denoptim.fragmenter.ClusterableFragment.getJGraphFragIsomorphism(), denoptim.fragmenter.ClusterableFragment.getOriginalFragment(), denoptim.fragmenter.ClusterableFragment.getTransformedCopy(), and denoptim.fragmenter.ClusterableFragment.setNaturalNodeOrder().
|
private |
Ordered list of nodes determined by isomorphism.
Definition at line 38 of file ClusterableFragment.java.
Referenced by denoptim.fragmenter.ClusterableFragment.clone(), denoptim.fragmenter.ClusterableFragment.getOrderedNodes(), and denoptim.fragmenter.ClusterableFragment.setOrderOfNodes().