$darkmode
DENOPTIM
denoptim.graph.rings.RingSizeManager Class Reference

Utility class to calculate and manage the alternative ring sizes achievable by formation of Rings. More...

Collaboration diagram for denoptim.graph.rings.RingSizeManager:
[legend]

Public Member Functions

 RingSizeManager (FragmentSpace fragSpace, RingClosureParameters rcParams)
 Creates a tool that will work according to the given system-aspecific settings. More...
 
void initialize (IAtomContainer origMol, DGraph graph)
 Makes this ring size manager work on a specific system that has a molecular representation and a DENOPTIM's graph representation. More...
 
List< VertexgetRSBiasedListOfCandidates ()
 
List< VertexgetRSBiasedListOfCandidates (Vertex vI)
 
void addRingClosingBond (Vertex vI, Vertex vJ)
 
void setVertexAsDone (Vertex v)
 
boolean getCompatibilityOfPair (Vertex vI, Vertex vJ)
 

Private Member Functions

void fillTopologicalMatrix ()
 
void calculateCompatibilityOfAllRCAPairs ()
 
boolean evaluateRCVPair (Vertex vI, Vertex vJ, FragmentSpace fragSpace)
 Method to analyze a pair of vertices and evaluate whether they respect the criteria for being the two ends of a candidate closable chain: a pair of Ring Closing Vertices (RCV). More...
 

Private Attributes

IAtomContainer mol
 Molecular representation of the current system. More...
 
int[][] topoMat
 Topological matrix: contains the number of bonds (shortest path) separating the two atoms having index i and j in the current system. More...
 
ArrayList< VertexlstVert
 List of Ring Closing Vertices (RCV as DENOPTIMVerex) each containing an available Ring Closing Attractor (RCA) More...
 
int sz
 Size of the list of available RCAs. More...
 
boolean[][] compatibilityOfPairs
 Compatibility matrix between pairs of RCAs in the current system. More...
 
List< Double > weigths
 List of weight factors used to control the likeliness of choosing rings of a given size for the current system. More...
 
List< Boolean > done
 List of flags defining if an RCA has been "used", i.e., not used to make an actual chord, but used to make a plan to make a chord and update the molecular representation accordingly. More...
 
Map< Vertex, ArrayList< Integer > > vIdToAtmId
 Map linking the list of vertices and atoms. More...
 
List< Integer > ringSizeBias
 Parameters setting the bias for selecting rings of given size. More...
 
FragmentSpace fragSpace = null
 Definition of the fragment space. More...
 
RingClosureParameters settings
 Parameters related to rings. More...
 
Logger logger
 tool managing the logs More...
 

Static Private Attributes

static final String NL = DENOPTIMConstants.EOL
 New line character. More...
 

Detailed Description

Utility class to calculate and manage the alternative ring sizes achievable by formation of Rings.

Definition at line 35 of file RingSizeManager.java.

Constructor & Destructor Documentation

◆ RingSizeManager()

denoptim.graph.rings.RingSizeManager.RingSizeManager ( FragmentSpace  fragSpace,
RingClosureParameters  rcParams 
)

Creates a tool that will work according to the given system-aspecific settings.

Parameters
fragSpacethe space of building blocks.
rcParamsthe parameters pertaining ring closures.

Definition at line 115 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.fragSpace, denoptim.programs.RunTimeParameters.getLogger(), and denoptim.graph.rings.RingClosureParameters.getRingSizeBias().

Here is the call graph for this function:

Member Function Documentation

◆ addRingClosingBond()

void denoptim.graph.rings.RingSizeManager.addRingClosingBond ( Vertex  vI,
Vertex  vJ 
)

Definition at line 466 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.calculateCompatibilityOfAllRCAPairs(), denoptim.graph.rings.RingSizeManager.fillTopologicalMatrix(), denoptim.graph.Edge.getBondType(), denoptim.graph.Edge.BondType.getCDKOrder(), denoptim.graph.Vertex.getEdgeToParent(), denoptim.graph.Edge.BondType.hasCDKAnalogue(), denoptim.graph.rings.RingSizeManager.logger, denoptim.graph.rings.RingSizeManager.mol, and denoptim.graph.rings.RingSizeManager.vIdToAtmId.

Referenced by denoptim.graph.rings.RandomCombOfRingsIterator.next().

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

◆ calculateCompatibilityOfAllRCAPairs()

◆ evaluateRCVPair()

boolean denoptim.graph.rings.RingSizeManager.evaluateRCVPair ( Vertex  vI,
Vertex  vJ,
FragmentSpace  fragSpace 
)
private

Method to analyze a pair of vertices and evaluate whether they respect the criteria for being the two ends of a candidate closable chain: a pair of Ring Closing Vertices (RCV).

Parameters
vIfirst vertex
vJsecond vertex
Returns
true is the path satisfies the criteria

Definition at line 316 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.fragSpace, denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.graph.Vertex.getEdgeToParent(), denoptim.graph.Vertex.getParent(), denoptim.fragspace.FragmentSpace.getRCCompatibilityMatrix(), denoptim.graph.Edge.getSrcAPClass(), denoptim.graph.Edge.getSrcAPID(), and denoptim.graph.rings.RingSizeManager.logger.

Referenced by denoptim.graph.rings.RingSizeManager.calculateCompatibilityOfAllRCAPairs().

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

◆ fillTopologicalMatrix()

void denoptim.graph.rings.RingSizeManager.fillTopologicalMatrix ( )
private

Definition at line 167 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.logger, denoptim.graph.rings.RingSizeManager.mol, denoptim.graph.rings.RingSizeManager.NL, and denoptim.graph.rings.RingSizeManager.topoMat.

Referenced by denoptim.graph.rings.RingSizeManager.addRingClosingBond(), and denoptim.graph.rings.RingSizeManager.initialize().

Here is the caller graph for this function:

◆ getCompatibilityOfPair()

boolean denoptim.graph.rings.RingSizeManager.getCompatibilityOfPair ( Vertex  vI,
Vertex  vJ 
)

Definition at line 516 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.compatibilityOfPairs, and denoptim.graph.rings.RingSizeManager.lstVert.

Referenced by denoptim.graph.rings.CyclicGraphHandler.getPossibleCombinationOfRings(), and denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair().

Here is the caller graph for this function:

◆ getRSBiasedListOfCandidates() [1/2]

List< Vertex > denoptim.graph.rings.RingSizeManager.getRSBiasedListOfCandidates ( )

◆ getRSBiasedListOfCandidates() [2/2]

◆ initialize()

void denoptim.graph.rings.RingSizeManager.initialize ( IAtomContainer  origMol,
DGraph  graph 
)

Makes this ring size manager work on a specific system that has a molecular representation and a DENOPTIM's graph representation.

Parameters
origMolthe molecular representation.
graphthe graph representation.
Exceptions
DENOPTIMException

Definition at line 133 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.calculateCompatibilityOfAllRCAPairs(), denoptim.graph.rings.RingSizeManager.done, denoptim.graph.rings.RingSizeManager.fillTopologicalMatrix(), denoptim.graph.DGraph.getFreeRCVertices(), denoptim.utils.MoleculeUtils.getVertexToAtomIdMap(), denoptim.graph.rings.RingSizeManager.lstVert, denoptim.graph.rings.RingSizeManager.mol, denoptim.graph.rings.RingSizeManager.sz, and denoptim.graph.rings.RingSizeManager.vIdToAtmId.

Referenced by denoptim.graph.rings.CyclicGraphHandler.getPossibleCombinationOfRings(), denoptim.graph.rings.RandomCombOfRingsIterator.next(), and denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair().

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

◆ setVertexAsDone()

void denoptim.graph.rings.RingSizeManager.setVertexAsDone ( Vertex  v)

Definition at line 509 of file RingSizeManager.java.

References denoptim.graph.rings.RingSizeManager.done, and denoptim.graph.rings.RingSizeManager.lstVert.

Referenced by denoptim.graph.rings.RandomCombOfRingsIterator.next().

Here is the caller graph for this function:

Member Data Documentation

◆ compatibilityOfPairs

boolean [][] denoptim.graph.rings.RingSizeManager.compatibilityOfPairs
private

◆ done

List<Boolean> denoptim.graph.rings.RingSizeManager.done
private

List of flags defining if an RCA has been "used", i.e., not used to make an actual chord, but used to make a plan to make a chord and update the molecular representation accordingly.

Definition at line 75 of file RingSizeManager.java.

Referenced by denoptim.graph.rings.RingSizeManager.getRSBiasedListOfCandidates(), denoptim.graph.rings.RingSizeManager.initialize(), and denoptim.graph.rings.RingSizeManager.setVertexAsDone().

◆ fragSpace

FragmentSpace denoptim.graph.rings.RingSizeManager.fragSpace = null
private

◆ logger

◆ lstVert

ArrayList<Vertex> denoptim.graph.rings.RingSizeManager.lstVert
private

◆ mol

◆ NL

final String denoptim.graph.rings.RingSizeManager.NL = DENOPTIMConstants.EOL
staticprivate

◆ ringSizeBias

List<Integer> denoptim.graph.rings.RingSizeManager.ringSizeBias
private

Parameters setting the bias for selecting rings of given size.

Definition at line 85 of file RingSizeManager.java.

Referenced by denoptim.graph.rings.RingSizeManager.calculateCompatibilityOfAllRCAPairs(), and denoptim.graph.rings.RingSizeManager.getRSBiasedListOfCandidates().

◆ settings

RingClosureParameters denoptim.graph.rings.RingSizeManager.settings
private

◆ sz

int denoptim.graph.rings.RingSizeManager.sz
private

◆ topoMat

int [][] denoptim.graph.rings.RingSizeManager.topoMat
private

Topological matrix: contains the number of bonds (shortest path) separating the two atoms having index i and j in the current system.

Definition at line 46 of file RingSizeManager.java.

Referenced by denoptim.graph.rings.RingSizeManager.calculateCompatibilityOfAllRCAPairs(), denoptim.graph.rings.RingSizeManager.fillTopologicalMatrix(), and denoptim.graph.rings.RingSizeManager.getRSBiasedListOfCandidates().

◆ vIdToAtmId

Map<Vertex,ArrayList<Integer> > denoptim.graph.rings.RingSizeManager.vIdToAtmId
private

◆ weigths

List<Double> denoptim.graph.rings.RingSizeManager.weigths
private

List of weight factors used to control the likeliness of choosing rings of a given size for the current system.

Definition at line 68 of file RingSizeManager.java.

Referenced by denoptim.graph.rings.RingSizeManager.calculateCompatibilityOfAllRCAPairs(), and denoptim.graph.rings.RingSizeManager.getRSBiasedListOfCandidates().


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