$darkmode
DENOPTIM
denoptim.graph.APClass Class Reference
Inheritance diagram for denoptim.graph.APClass:
[legend]
Collaboration diagram for denoptim.graph.APClass:
[legend]

Classes

class  APClassDeserializer
 

Public Member Functions

 APClass ()
 Constructor for an empty APClass. More...
 
String getRule ()
 
int getSubClass ()
 
BondType getBondType ()
 
String toString ()
 Do not use this to make SDF representations. More...
 
String toSDFString ()
 
boolean isCPMapCompatibleWith (APClass other, FragmentSpace fragSpace)
 Check compatibility as defined in the compatibility matrix considering this AP as source and the other as target. More...
 
int compareTo (APClass o)
 
APClass clone ()
 WARNING: this method does NOT clone! It just returns the reference to this. More...
 
boolean equals (Object o)
 

Static Public Member Functions

static APClass make (String ruleAndSubclass) throws DENOPTIMException
 Creates an APClass if it does not exist already, or returns the reference to the existing instance. More...
 
static APClass make (String rule, int subClass) throws DENOPTIMException
 Constructor for an APClass with default bond type (i.e., BondType#DEFAULTBT). More...
 
static APClass make (String ruleAndSubclass, BondType bt) throws DENOPTIMException
 Constructor for a fully defined APClass. More...
 
static APClass make (String rule, int subClass, BondType bt) throws DENOPTIMException
 Constructor for a fully defined APClass. More...
 
static List< String > getAllAPClassesAsString ()
 Returns the list of the names of all APClasses. More...
 
static boolean isValidAPSubCLassString (String s)
 Evaluate the given string as a candidate for attachment point subclass, i.e., the attachment point class component discriminating the two sides of a bond being broken to yield two attachment points. More...
 
static boolean isValidAPRuleString (String s)
 Evaluates the given string as a candidate attachment point rule, i.e., as name of a fragmentation rule that generates attachment points. More...
 
static boolean isValidAPClassString (String s)
 Evaluate is a candidate string can be used as APClass. More...
 

Static Public Attributes

static Set< APClassuniqueAPClasses = new HashSet<APClass>()
 Set unique APClasses. More...
 
static final String ATPLUS = "ATplus"
 String defining a conventional APClass. More...
 
static final String ATMINUS = "ATminus"
 String defining a conventional APClass. More...
 
static final String ATNEUTRAL = "ATneutral"
 String defining a conventional APClass. More...
 
static final APClass RCACLASSPLUS
 Conventional class of attachment points on ring-closing vertexes. More...
 
static final APClass RCACLASSMINUS
 Conventional class of attachment points on ring-closing vertexes. More...
 
static final APClass RCACLASSNEUTRAL
 Conventional class of attachment points on ring-closing vertexes. More...
 
static final BondType DEFAULTBT = BondType.SINGLE
 Default bond type for all but APClasses of RCVs. More...
 

Private Member Functions

void setBondType (BondType bt)
 
void setRule (String rule)
 
void setSubClass (int sumClass)
 

Static Private Member Functions

static APClass getUnique (String rule, int subClass, BondType bt)
 Checks if there is already a instance with the given members, if not it created one. More...
 

Private Attributes

String rule
 The main feature of the APClass. More...
 
int subClass
 The secondary feature of the APClass. More...
 
BondType bndTyp = DEFAULTBT
 Bond type to use when converting edge users into formal bonds. More...
 

Static Private Attributes

static final Object uniqueAPClassesLock = new Object()
 Synchronization lock. More...
 

Detailed Description

Definition at line 40 of file APClass.java.

Constructor & Destructor Documentation

◆ APClass()

denoptim.graph.APClass.APClass ( )

Constructor for an empty APClass.

Definition at line 116 of file APClass.java.

Referenced by denoptim.graph.APClass.getUnique().

Here is the caller graph for this function:

Member Function Documentation

◆ clone()

APClass denoptim.graph.APClass.clone ( )

WARNING: this method does NOT clone! It just returns the reference to this.

We have this method to avoid any attempt to actual cloning of an APClass.

Definition at line 481 of file APClass.java.

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

Here is the caller graph for this function:

◆ compareTo()

int denoptim.graph.APClass.compareTo ( APClass  o)

Definition at line 463 of file APClass.java.

References denoptim.graph.APClass.rule, and denoptim.graph.APClass.subClass.

Referenced by denoptim.graph.AttachmentPoint.comparePropertiesTo(), and denoptim.graph.Fragment.identifySymmetryRelatedAPSets().

Here is the caller graph for this function:

◆ equals()

boolean denoptim.graph.APClass.equals ( Object  o)

◆ getAllAPClassesAsString()

static List< String > denoptim.graph.APClass.getAllAPClassesAsString ( )
static

Returns the list of the names of all APClasses.

Returns

Definition at line 303 of file APClass.java.

References denoptim.graph.APClass.uniqueAPClasses.

Referenced by denoptim.gui.GUIVertexInspector.choseOrCreateNewAPClass().

Here is the caller graph for this function:

◆ getBondType()

BondType denoptim.graph.APClass.getBondType ( )
Returns
the bond type associated with this APClass

Definition at line 341 of file APClass.java.

References denoptim.graph.APClass.bndTyp.

Referenced by denoptim.graph.AttachmentPoint.getBondType(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.AttachmentPointTest.testParsingofSdfAPString(), and denoptim.graph.simplified.UndirectedEdge.UndirectedEdge().

Here is the caller graph for this function:

◆ getRule()

String denoptim.graph.APClass.getRule ( )
Returns
the main part of this APClass, which typically corresponds to name of the fragmentation rule that generated attachment point with this APClass.

Definition at line 321 of file APClass.java.

References denoptim.graph.APClass.rule.

Referenced by denoptim.gui.CompatibilityMatrixForm.CompatibilityMatrixForm(), and denoptim.gui.CompatibilityMatrixForm.CompatibilityRuleLine.CompatibilityRuleLine().

Here is the caller graph for this function:

◆ getSubClass()

int denoptim.graph.APClass.getSubClass ( )
Returns
the secondary part of this APClass, which typically corresponds to the discriminating factor that distinguishes between asymmetric fragments.

Definition at line 332 of file APClass.java.

References denoptim.graph.APClass.subClass.

◆ getUnique()

static APClass denoptim.graph.APClass.getUnique ( String  rule,
int  subClass,
BondType  bt 
)
staticprivate

Checks if there is already a instance with the given members, if not it created one.

In either case, returns the reference to that instance of APClass.

Parameters
rule
subClass
Returns
reference to the APClass instance with the given members.

Definition at line 242 of file APClass.java.

References denoptim.graph.APClass.APClass(), denoptim.graph.APClass.bndTyp, denoptim.graph.rings.RingClosingAttractor.RCAAPCLASSSET, denoptim.graph.APClass.rule, denoptim.graph.APClass.setBondType(), denoptim.graph.APClass.setRule(), denoptim.graph.APClass.setSubClass(), denoptim.graph.APClass.subClass, denoptim.graph.APClass.uniqueAPClasses, and denoptim.graph.APClass.uniqueAPClassesLock.

Referenced by denoptim.graph.APClass.APClassDeserializer.deserialize(), and denoptim.graph.APClass.make().

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

◆ isCPMapCompatibleWith()

boolean denoptim.graph.APClass.isCPMapCompatibleWith ( APClass  other,
FragmentSpace  fragSpace 
)

Check compatibility as defined in the compatibility matrix considering this AP as source and the other as target.

Parameters
otherAP.
thefragment space that defines APClass compatibility rules.
Returns
true is APs of these two classes are allowed to form new vertex-vertex connections where this AP is source and other is target.

Definition at line 455 of file APClass.java.

References denoptim.fragspace.FragmentSpace.getCompatibleAPClasses().

Referenced by denoptim.fragspace.APMapFinder.findMappingCompatibileAPs(), denoptim.fragspace.GraphLinkFinder.GraphLinkFinder(), denoptim.ga.GraphOperations.isCrossoverPossible(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass(), and denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs().

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

◆ isValidAPClassString()

static boolean denoptim.graph.APClass.isValidAPClassString ( String  s)
static

Evaluate is a candidate string can be used as APClass.

This method checks whether the string reflects the expected syntax of an APClass string

Returns
true if the given string can be used as attachment point class.

Definition at line 412 of file APClass.java.

References denoptim.graph.APClass.isValidAPRuleString(), denoptim.graph.APClass.isValidAPSubCLassString(), and denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPSCL.

Referenced by denoptim.gui.GUIAPClassDefinitionDialog.GUIAPClassDefinitionDialog(), and denoptim.graph.APClass.make().

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

◆ isValidAPRuleString()

static boolean denoptim.graph.APClass.isValidAPRuleString ( String  s)
static

Evaluates the given string as a candidate attachment point rule, i.e., as name of a fragmentation rule that generates attachment points.

Parameters
sthe string to evaluate
Returns
true if the given string can be used as attachment point rule.

Definition at line 396 of file APClass.java.

Referenced by denoptim.gui.GUIVertexInspector.ensureGoodAPRuleString(), denoptim.graph.APClass.isValidAPClassString(), denoptim.graph.APClass.make(), and denoptim.graph.APClassTest.testIsValidAPRuleString().

Here is the caller graph for this function:

◆ isValidAPSubCLassString()

static boolean denoptim.graph.APClass.isValidAPSubCLassString ( String  s)
static

Evaluate the given string as a candidate for attachment point subclass, i.e., the attachment point class component discriminating the two sides of a bond being broken to yield two attachment points.

Parameters
sthe string to evaluate
Returns
true if the given string can be used as

Definition at line 381 of file APClass.java.

Referenced by denoptim.graph.APClass.isValidAPClassString(), and denoptim.graph.APClassTest.testIsValidAPSubCLassString().

Here is the caller graph for this function:

◆ make() [1/4]

static APClass denoptim.graph.APClass.make ( String  rule,
int  subClass 
) throws DENOPTIMException
static

Constructor for an APClass with default bond type (i.e., BondType#DEFAULTBT).

Checks if there is already a instance with the given rule name and subclass, if not it created one. In either case, returns the reference to that instance of APClass. This method does not define the bond type that should be used to make bonds when using the attachment point belonging to the specified class. Therefore, it creates an incomplete class definition. To create a complete one, use make(String, int, BondType).

Parameters
rulethe APClass rule, i.e., a string identifier that typically corresponds to the name of the cutting rule used to break a bond.
subClassthe integer identifier of the "side" of the bond broken to make an attachment point.
Exceptions
DENOPTIMException

Definition at line 169 of file APClass.java.

References denoptim.graph.APClass.DEFAULTBT, denoptim.graph.APClass.make(), denoptim.graph.APClass.rule, and denoptim.graph.APClass.subClass.

Here is the call graph for this function:

◆ make() [2/4]

static APClass denoptim.graph.APClass.make ( String  rule,
int  subClass,
BondType  bt 
) throws DENOPTIMException
static

Constructor for a fully defined APClass.

Checks if there is already a instance with the given members, if not it created one. In either case, returns the reference to that instance of APClass.

Parameters
rulethe APClass rule, i.e., a string identifier that typically corresponds to the name of the cutting rule used to break a bond.
subClassthe integer identifier of the "side" of the bond broken to make an attachment point.
btthe bond type to be used when converting edges using APs of this APClass into bonds, if any.
Exceptions
DENOPTIMException

Definition at line 221 of file APClass.java.

References denoptim.graph.APClass.getUnique(), denoptim.graph.APClass.isValidAPRuleString(), denoptim.graph.APClass.rule, and denoptim.graph.APClass.subClass.

Here is the call graph for this function:

◆ make() [3/4]

static APClass denoptim.graph.APClass.make ( String  ruleAndSubclass) throws DENOPTIMException
static

Creates an APClass if it does not exist already, or returns the reference to the existing instance.

This method does not define the bond type that should be used to make bonds when using the attachment point belonging to the specified class. Therefore, it creates an incomplete class definition. To create a complete one, use make(String, int, BondType).

Parameters
ruleAndSubclassthe string representing the APClass name in terms of 'rule' and 'subclass', where the first is typically the name of the cutting rule that generated the attachment point, and the second is the integer desymmetrizing the two attachment points created by braking asymmetric bonds.
Exceptions
DENOPTIMExceptionwhen syntax of the string is not correct.

Definition at line 136 of file APClass.java.

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

Referenced by denoptim.ga.EAUtils.appendVertexesToGraphFollowingEdges(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.gui.GUIVertexInspector.choseOrCreateNewAPClass(), denoptim.gui.CompatibilityMatrixForm.CompatibilityMatrixForm(), denoptim.gui.CompatibilityMatrixForm.CompatibilityRuleLine.CompatibilityRuleLine(), denoptim.gui.GUIVertexInspector.convertAtomToAP(), denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.graph.TemplateTest.getAmideFragment(), denoptim.graph.TemplateTest.getCH2Fragment(), denoptim.graph.TemplateTest.getOHFragment(), denoptim.gui.GUIEmptyVertexMaker.GUIEmptyVertexMaker(), denoptim.fragspace.FragmentSpaceParameters.interpretKeyword(), denoptim.graph.rings.RingClosureParameters.interpretKeyword(), denoptim.graph.APClass.make(), denoptim.graph.FragmentTest.makeFragment(), denoptim.graph.FragmentTest.makeFragmentA(), denoptim.graph.FragmentTest.makeFragmentB(), denoptim.graph.FragmentTest.makeFragmentC(), denoptim.graph.FragmentIsomorphismInspectorTest.makePathologicalFragment(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphA(), denoptim.graph.rings.RingSizeManagerTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphA2(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphB(), denoptim.fragspace.APMapFinderTest.prepare(), denoptim.fragspace.GraphLinkFinderTest.prepare(), denoptim.ga.EAUtilsTest.prepare(), denoptim.ga.GraphOperationsTest.prepare(), denoptim.ga.PopulationTest.prepare(), denoptim.graph.DGraphTest.prepare(), denoptim.graph.AttachmentPoint.processSdfString(), denoptim.io.DenoptimIO.readCompatibilityMatrix(), denoptim.io.DenoptimIO.readRCCompatibilityMatrix(), denoptim.graph.AttachmentPoint.setAPClass(), denoptim.ga.GraphOperationsTest.setUpClass(), denoptim.graph.TemplateTest.testAddAP_after_setInnerGraph_throwsException(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.io.DenoptimIOTest.testAppendToJSON(), denoptim.graph.AttachmentPointTest.testClone(), denoptim.graph.VertexTest.testClone(), denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.fragmenter.FragmentClustererTest.testCluster2(), denoptim.graph.APClassTest.testCompareTo(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFString(), denoptim.graph.AttachmentPointTest.testConstructorsAndSDFStringNoDirVec(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.FragmentTest.testConversionToIAC(), denoptim.graph.APClassTest.testEquals(), 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.fragspace.APMapFinderTest.testFindMappingCompatibileAPs(), denoptim.graph.DGraphTest.testFindVertex(), denoptim.graph.VertexTest.testFromToJSON_withSymmetricAPs(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetCentroid(), denoptim.graph.AttachmentPointTest.testGetLinkedAP(), denoptim.fragmenter.FragmentAlignementTest.testGetMinimumRMSD(), denoptim.fragmenter.DynamicCentroidClusterTest.testGetNearestToCentroid(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass(), denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass(), denoptim.graph.SymmetricAPsTest.testGetSameAsThis(), denoptim.fragmenter.ClusterableFragmentTest.testGetTransformedCopy(), denoptim.graph.FragmentTest.testHandlingAPsAsObjOrProperty(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), denoptim.graph.AttachmentPointTest.testHasSameSrcAtom(), denoptim.io.DenoptimIOTest.testIOEmptyVertex(), denoptim.graph.AttachmentPointTest.testIsSrcInUser(), denoptim.graph.APClassTest.testListContains(), denoptim.io.DenoptimIOTest.testReadAllAPClasses(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.graph.SymmetricAPsTest.testSameAs(), denoptim.graph.AttachmentPointTest.testSameAs_DiffAPClass(), denoptim.graph.TemplateTest.testSetInnerGraph_throws_on_graph_incompatible_w_requiredAPs(), denoptim.fragmenter.ClusterableFragmentTest.testSetNaturalNodeOrder(), denoptim.graph.AttachmentPointTest.testSortAPs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().

Here is the call graph for this function:

◆ make() [4/4]

static APClass denoptim.graph.APClass.make ( String  ruleAndSubclass,
BondType  bt 
) throws DENOPTIMException
static

Constructor for a fully defined APClass.

Checks if there is already a instance with the given members, if not it created one. In either case, returns the reference to that instance of APClass.

Parameters
ruleAndSubclassthe string representing the APClass name in terms of 'rule' and 'subclass', where the first is typically the name of the cutting rule that generated the attachment point, and the second is the integer desymmetrizing the two attachment points created by braking asymmetric bonds.
btthe bond type to be used when converting edges using APs of this APClass into bonds, if any.
Exceptions
DENOPTIMException

Definition at line 191 of file APClass.java.

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

Here is the call graph for this function:

◆ setBondType()

void denoptim.graph.APClass.setBondType ( BondType  bt)
private

Definition at line 281 of file APClass.java.

Referenced by denoptim.graph.APClass.getUnique().

Here is the caller graph for this function:

◆ setRule()

void denoptim.graph.APClass.setRule ( String  rule)
private

Definition at line 287 of file APClass.java.

References denoptim.graph.APClass.rule.

Referenced by denoptim.graph.APClass.getUnique().

Here is the caller graph for this function:

◆ setSubClass()

void denoptim.graph.APClass.setSubClass ( int  sumClass)
private

Definition at line 293 of file APClass.java.

Referenced by denoptim.graph.APClass.getUnique().

Here is the caller graph for this function:

◆ toSDFString()

String denoptim.graph.APClass.toSDFString ( )
Returns
a string with a format compatible with reporting APClasses in text files (e.g., compatibility matrix files) and SDF files (e.g., SDF with fragments).

Definition at line 364 of file APClass.java.

References denoptim.graph.APClass.bndTyp, denoptim.graph.APClass.rule, and denoptim.graph.APClass.subClass.

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

Here is the caller graph for this function:

◆ toString()

Member Data Documentation

◆ ATMINUS

final String denoptim.graph.APClass.ATMINUS = "ATminus"
static

String defining a conventional APClass.

Definition at line 73 of file APClass.java.

◆ ATNEUTRAL

final String denoptim.graph.APClass.ATNEUTRAL = "ATneutral"
static

String defining a conventional APClass.

Definition at line 78 of file APClass.java.

◆ ATPLUS

final String denoptim.graph.APClass.ATPLUS = "ATplus"
static

String defining a conventional APClass.

Definition at line 68 of file APClass.java.

Referenced by denoptim.ga.EAUtils.appendVertexesToGraphFollowingEdges().

◆ bndTyp

BondType denoptim.graph.APClass.bndTyp = DEFAULTBT
private

Bond type to use when converting edge users into formal bonds.

Definition at line 104 of file APClass.java.

Referenced by denoptim.graph.APClass.getBondType(), denoptim.graph.APClass.getUnique(), and denoptim.graph.APClass.toSDFString().

◆ DEFAULTBT

◆ RCACLASSMINUS

◆ RCACLASSNEUTRAL

final APClass denoptim.graph.APClass.RCACLASSNEUTRAL
static
Initial value:
BondType.ANY)
static final String ATNEUTRAL
String defining a conventional APClass.
Definition: APClass.java:78

Conventional class of attachment points on ring-closing vertexes.

Unpolarized, neutral case.

Definition at line 98 of file APClass.java.

◆ RCACLASSPLUS

◆ rule

String denoptim.graph.APClass.rule
private

◆ subClass

int denoptim.graph.APClass.subClass
private

◆ uniqueAPClasses

Set<APClass> denoptim.graph.APClass.uniqueAPClasses = new HashSet<APClass>()
static

◆ uniqueAPClassesLock

final Object denoptim.graph.APClass.uniqueAPClassesLock = new Object()
staticprivate

Synchronization lock.

Used to guard alteration of the set of unique APClasses.

Definition at line 63 of file APClass.java.

Referenced by denoptim.graph.APClass.getUnique().


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