23import java.util.ArrayList;
24import java.util.HashSet;
25import java.util.LinkedHashMap;
28import java.util.Map.Entry;
30import java.util.TreeMap;
31import java.util.logging.Level;
32import java.util.stream.Collectors;
34import org.openscience.cdk.interfaces.IAtomContainer;
35import org.paukov.combinatorics3.Generator;
37import denoptim.constants.DENOPTIMConstants;
38import denoptim.exception.DENOPTIMException;
39import denoptim.fragmenter.BridgeHeadFindingRule;
40import denoptim.fragspace.APMapFinder;
41import denoptim.fragspace.FragmentSpace;
42import denoptim.fragspace.FragmentSpaceParameters;
43import denoptim.fragspace.GraphLinkFinder;
44import denoptim.fragspace.IdFragmentAndAP;
45import denoptim.graph.APClass;
46import denoptim.graph.APMapping;
47import denoptim.graph.AttachmentPoint;
48import denoptim.graph.DGraph;
49import denoptim.graph.Edge;
50import denoptim.graph.RelatedAPPair;
51import denoptim.graph.Ring;
52import denoptim.graph.SymmetricAPs;
53import denoptim.graph.SymmetricVertexes;
54import denoptim.graph.Template;
55import denoptim.graph.Template.ContractLevel;
56import denoptim.graph.Vertex;
57import denoptim.graph.Vertex.BBType;
58import denoptim.graph.rings.ChainLink;
59import denoptim.graph.rings.ClosableChain;
60import denoptim.graph.rings.PathSubGraph;
61import denoptim.graph.rings.RandomCombOfRingsIterator;
62import denoptim.graph.rings.RingClosingAttractor;
63import denoptim.graph.rings.RingClosureParameters;
64import denoptim.io.DenoptimIO;
65import denoptim.logging.CounterID;
66import denoptim.logging.Monitor;
67import denoptim.molecularmodeling.ThreeDimTreeBuilder;
68import denoptim.programs.RunTimeParameters.ParametersType;
69import denoptim.programs.denovo.GAParameters;
70import denoptim.utils.CrossoverType;
71import denoptim.utils.GraphUtils;
72import denoptim.utils.MutationType;
73import denoptim.utils.Randomizer;
109 int maxSizeXoverSubGraph,
int maxCompatibleVrtxPairs,
110 int maxEndPointsCombinations,
int maxEndPointsPermutations,
111 int maxAPMappingCombinations)
120 List<Vertex[]> compatibleVrtxPairs =
new ArrayList<Vertex[]>();
121 boolean needsRandomCap =
false;
123 for (
Edge eA : graphA.getEdgeList())
125 Vertex vA = eA.getTrgAP().getOwner();
130 for (
Edge eB : graphB.getEdgeList())
132 Vertex vB = eB.getTrgAP().getOwner();
140 if (compatibleVrtxPairs.size() >= maxCompatibleVrtxPairs)
142 needsRandomCap =
true;
143 break scanCompatiblePairs;
146 compatibleVrtxPairs.add(pair);
152 fragSpace.getLogger().log(Level.WARNING,
153 "Capped list of compatible xover vertex pairs at "
154 + maxCompatibleVrtxPairs);
157 List<Edge> edgesA =
new ArrayList<Edge>(graphA.getEdgeList());
158 List<Edge> edgesB =
new ArrayList<Edge>(graphB.getEdgeList());
162 compatibleVrtxPairs =
new ArrayList<Vertex[]>();
163 collectRandomCompatiblePairs:
164 for (
Edge eA : edgesA)
166 Vertex vA = eA.getTrgAP().getOwner();
170 for (
Edge eB : edgesB)
172 Vertex vB = eB.getTrgAP().getOwner();
179 compatibleVrtxPairs.add(pair);
180 if (compatibleVrtxPairs.size() >= maxCompatibleVrtxPairs)
182 break collectRandomCompatiblePairs;
192 ArrayList<XoverSite> sites =
new ArrayList<XoverSite>();
193 for (
Vertex[] pair : compatibleVrtxPairs)
201 List<Vertex> descendantsA =
new ArrayList<Vertex>();
203 List<Vertex> descendantsB =
new ArrayList<Vertex>();
218 List<Vertex> branchOnVA =
new ArrayList<Vertex>();
220 branchOnVA.addAll(descendantsA);
221 List<Vertex> branchOnVB =
new ArrayList<Vertex>();
223 branchOnVB.addAll(descendantsB);
227 maxAPMappingCombinations);
238 List<Vertex[]> usablePairs =
new ArrayList<Vertex[]>();
253 for (
Vertex[] otherPair : compatibleVrtxPairs)
257 Vertex nextToEndOnA = otherPair[0];
258 Vertex nextToEndOnB = otherPair[1];
261 if (endOnA==
null || endOnB==
null)
265 if (!descendantsA.contains(endOnA) && endOnA!=vA
266 || !descendantsB.contains(endOnB) && endOnB!=vB)
287 if (!usablePairs.contains(pairOfEnds))
288 usablePairs.add(pairOfEnds);
292 TreeMap<String,List<Vertex[]>> sitesByBranchIdA =
293 new TreeMap<String,List<Vertex[]>>();
294 TreeMap<String,List<Vertex[]>> sitesByBranchIdB =
295 new TreeMap<String,List<Vertex[]>>();
296 for (
Vertex[] pp : usablePairs)
300 if (sitesByBranchIdA.containsKey(branchIdA))
302 sitesByBranchIdA.get(branchIdA).add(pp);
304 ArrayList<Vertex[]> lst =
new ArrayList<Vertex[]>();
306 sitesByBranchIdA.put(branchIdA, lst);
308 if (sitesByBranchIdB.containsKey(branchIdB))
310 sitesByBranchIdB.get(branchIdB).add(pp);
312 ArrayList<Vertex[]> lst =
new ArrayList<Vertex[]>();
314 sitesByBranchIdB.put(branchIdB, lst);
320 TreeMap<String,List<Vertex[]>> fewestBranchesSide =
null;
321 if (sitesByBranchIdA.size() <= sitesByBranchIdB.size())
322 fewestBranchesSide = sitesByBranchIdA;
324 fewestBranchesSide = sitesByBranchIdB;
327 for (List<
Vertex[]> val : fewestBranchesSide.values())
328 val.add(
new Vertex[]{
null,
null});
333 List<List<Vertex[]>> preCombsOfEnds = Generator.cartesianProduct(
334 fewestBranchesSide.values())
336 .limit(maxEndPointsCombinations)
337 .collect(Collectors.<List<
Vertex[]>>toList());
341 List<List<Vertex[]>> combsOfEnds =
new ArrayList<List<Vertex[]>>();
342 for (List<
Vertex[]> comb : preCombsOfEnds)
344 List<Vertex[]> nullPurgedComb =
new ArrayList<Vertex[]>();
345 for (
Vertex[] inPair : comb)
347 if (inPair[0]!=
null && inPair[1]!=
null)
348 nullPurgedComb.add(inPair);
352 if (nullPurgedComb.size()>0)
353 combsOfEnds.add(nullPurgedComb);
371 .limit(maxEndPointsCombinations)
373 fragSpace, maxEndPointsPermutations,
374 maxAPMappingCombinations));
378 for (
Vertex vA : graphA.getVertexList())
387 for (
Vertex vB : graphB.getVertexList())
398 maxSizeXoverSubGraph, maxCompatibleVrtxPairs,
399 maxEndPointsCombinations, maxEndPointsPermutations,
400 maxAPMappingCombinations))
402 if (!sites.contains(xos))
427 List<
Vertex[]> cominationOfEnds,
429 int maxEndPointsPermutations,
int maxAPMappingCombinations)
433 if (cominationOfEnds.size()==0)
454 Generator.permutation(cominationOfEnds)
457 .limit(maxEndPointsPermutations)
459 fragSpace, maxAPMappingCombinations));
478 List<
Vertex[]> chosenSequenceOfEndpoints,
480 int maxAPMappingCombinations)
488 boolean exclude =
false;
489 for (
Vertex[] pairA : chosenSequenceOfEndpoints)
491 for (
Vertex[] pairB : chosenSequenceOfEndpoints)
496 if (pairA[0]==pairB[0] || pairA[1]==pairB[1])
508 List<Vertex> subGraphEndInA =
new ArrayList<Vertex>();
509 List<Vertex> subGraphEndInB =
new ArrayList<Vertex>();
510 List<Vertex> alreadyIncludedFromA =
new ArrayList<Vertex>();
511 List<Vertex> alreadyIncludedFromB =
new ArrayList<Vertex>();
512 for (
Vertex[] otherPair : chosenSequenceOfEndpoints)
514 Vertex endOnA = otherPair[0];
515 Vertex endOnB = otherPair[1];
518 if (alreadyIncludedFromA.contains(endOnA)
519 || alreadyIncludedFromB.contains(endOnB))
534 subGraphEndInA.add(endOnA);
535 subGraphEndInB.add(endOnB);
539 ArrayList<Vertex> subGraphA =
new ArrayList<Vertex>();
541 if (!subGraphEndInA.contains(vA))
544 ArrayList<Vertex> subGraphB =
new ArrayList<Vertex>();
546 if (!subGraphEndInB.contains(vB))
550 if (subGraphA.size()>1 && subGraphB.size()>1)
557 if (subGraphA.get(0).sameAs(subGraphB.get(0),
new StringBuilder()))
577 List<Vertex> subGraphA,
579 List<XoverSite> collector,
int maxAPMappingCombinations)
581 DGraph gOwnerA = subGraphA.get(0).getGraphOwner();
582 DGraph gOwnerB = subGraphB.get(0).getGraphOwner();
594 if (allAPsA.size() < needyAPsB.size()
595 || allAPsB.size() < needyAPsA.size())
612 && jacketTmplB==
null)
615 needyAPsB, xoverType);
616 if (!collector.contains(xos))
627 for (
Vertex v : subGraphA)
630 for (
Vertex v : subGraphB)
651 allAPsA, needyAPsA, allAPsB, needyAPsB,
656 maxAPMappingCombinations);
660 subGraphB, needyAPsB, xoverType);
661 if (!collector.contains(xos))
714 DGraph graph = vertex.getGraphOwner();
762 DGraph graph = vertex.getGraphOwner();
797 return extendLink(vertex, chosenAPId, -1 , mnt, fragSpace);
834 +vertex+
" has no edge user.");
839 +
"vertex (AP "+chosenAPId+
" of vertex "+vertex+
").");
841 return extendLink(e, chosenNewVrtxId, mnt, fragSpace);
880 LinkedHashMap<AttachmentPoint,Integer> apMap =
881 new LinkedHashMap<AttachmentPoint,Integer>();
882 for (Entry<AttachmentPoint, AttachmentPoint> e :
885 apMap.put(e.getKey(), e.getValue().getIndexInOwner());
888 DGraph graph = edge.getSrcAP().getOwner().getGraphOwner();
925 boolean force,
int chosenVrtxIdx,
int chosenApId,
928 DGraph g = vertex.getGraphOwner();
931 Edge e = vertex.getEdgeToParent();
934 String msg =
"Program Bug in substituteFragment: Unable to locate "
935 +
"parent edge for vertex "+vertex+
" in graph "+g;
936 settings.getLogger().log(Level.SEVERE, msg);
951 return extendGraph(parentVrt,
false,symmetry,force,chosenVrtxIdx,
952 chosenApId, settings);
968 long vid = vertex.getVertexId();
969 DGraph molGraph = vertex.getGraphOwner();
973 List<Vertex> toRemove =
new ArrayList<Vertex>();
1008 long vid = vertex.getVertexId();
1009 DGraph molGraph = vertex.getGraphOwner();
1013 List<Vertex> toRemove =
new ArrayList<Vertex>();
1015 for (
Vertex v : toRemove)
1017 if (!v.getMutationTypes(
new ArrayList<MutationType>())
1064 vertex.getGraphOwner().removeCappingGroups();
1066 List<AttachmentPoint> freeeAPs = vertex.getFreeAPThroughout();
1067 if (freeeAPs.size()==0)
1072 DGraph originalGraph = vertex.getGraphOwner();
1079 List<Ring> setOfRingsOnTmpGraph =
null;
1082 APClass apc = srcAP.getAPClass();
1085 if (!fragSpace.getRCCompatibilityMatrix().containsKey(apc))
1089 List<APClass> rcTrgAPCs = fragSpace.getRCCompatibilityMatrix().get(
1093 Vertex rcvOnSrcAP =
null;
1094 List<Vertex> candidateRCVs = fragSpace.getRCVsForAPClass(apc);
1095 boolean rcvIsChosenArbitrarily =
false;
1096 if (candidateRCVs.size()>0)
1100 rcvIsChosenArbitrarily =
true;
1101 rcvOnSrcAP = fragSpace.getPolarizedRCV(
true);
1105 List<Vertex> rcvAddedToGraph =
new ArrayList<Vertex>();
1107 rcvAddedToGraph.add(rcvOnSrcAP);
1112 for (
int i=0; i<20; i++)
1115 List<AttachmentPoint> apsToTry =
1117 int numberOfAttempts = apsToTry.size();
1119 for (
int iap=0; iap<numberOfAttempts; iap++)
1122 if (rcTrgAPCs.contains(candidate.
getAPClass()))
1127 apsToTry.remove(trgAP);
1136 Vertex rcvOnTrgAP =
null;
1137 if (rcvIsChosenArbitrarily)
1139 rcvOnTrgAP = fragSpace.getPolarizedRCV(
false);
1141 List<Vertex> candRCVs = fragSpace.getRCVsForAPClass(
1143 if (candRCVs.size()>0)
1147 List<Vertex> keptRCVs =
new ArrayList<Vertex>();
1148 for (
Vertex rcv : candRCVs)
1150 if (requiredAPC.
equals(rcv.getAP(0).getAPClass()))
1154 if (rcvOnTrgAP==
null)
1169 rcvAddedToGraph.add(rcvOnTrgAP);
1171 if (rcvAddedToGraph.size() < 2)
1180 settings.getLogger(), rng);
1186 settings.getMaxRingsAddedByMutation(),
1187 fragSpace, rcParams);
1193 setOfRingsOnTmpGraph = rCombIter.
next();
1196 if (setOfRingsOnTmpGraph.size()>0)
1200 for (
Vertex toRemove : rcvAddedToGraph)
1203 if (setOfRingsOnTmpGraph==
null || setOfRingsOnTmpGraph.size()==0)
1210 boolean done =
false;
1211 for (
Ring rOnTmp : setOfRingsOnTmpGraph)
1215 tmpGraph.
indexOf(rOnTmp.getHeadVertex().getParent()));
1217 rOnTmp.getHeadVertex().getEdgeToParent().getSrcAP()
1218 .getIndexInOwner());
1224 headRCV = rOnTmp.getHeadVertex().
clone();
1232 tmpGraph.
indexOf(rOnTmp.getTailVertex().getParent()));
1234 rOnTmp.getTailVertex().getEdgeToParent().getSrcAP()
1235 .getIndexInOwner());
1241 tailRCV = rOnTmp.getTailVertex().
clone();
1248 originalGraph.
addRing(headRCV, tailRCV);
1253 vertex.getGraphOwner().addCappingGroups(fragSpace);
1290 vertex.getGraphOwner().removeCappingGroups();
1292 List<AttachmentPoint> freeAPs = vertex.getFreeAPThroughout();
1293 if (freeAPs.size()==0)
1299 DGraph graph = vertex.getGraphOwner();
1304 List<List<RelatedAPPair>> candidatePairsSets =
1309 rng.
nextBoolean(settings.getSymmetryProbability()),
1310 settings.getLogger(), rng);
1311 if (candidatePairsSets.size()==0)
1321 List<List<RelatedAPPair>> szBiasedCandidatePairsSets =
1322 new ArrayList<List<RelatedAPPair>>();
1323 for (List<RelatedAPPair> pairSet : candidatePairsSets)
1326 pairSet.get(0).property;
1330 for (
int i=0; i<allowedBridgeLengths.length; i++)
1332 int allowedBridgeLength = allowedBridgeLengths[i];
1333 int possibleRingSize = allowedBridgeLength
1334 + existingBridgeLength;
1344 for (
int z=0; z<weight; z++)
1346 szBiasedCandidatePairsSets.add(pairSet);
1350 if (szBiasedCandidatePairsSets.size()==0)
1358 szBiasedCandidatePairsSets);
1363 String elsInHalfFrag = chosenPairsSet.get(0).propID.substring(0,1);
1364 if (elsInHalfFrag.matches(
"[a-zA-Z]"))
1365 elsInHalfFrag =
"0";
1366 boolean newRingIsAromatic =
true;
1367 String elInIncomingFrag =
"0el";
1368 switch (elsInHalfFrag)
1373 elInIncomingFrag =
"0el";
1374 newRingIsAromatic =
false;
1380 elInIncomingFrag =
"4el";
1386 elInIncomingFrag =
"3el";
1391 elInIncomingFrag =
"2el";
1397 elInIncomingFrag =
"1el";
1400 throw new Error(
"Unknown number of pi-electrons in fragment to "
1401 +
"be used for ring fusion operation.");
1407 chosenPairsSet.get(0).property;
1409 List<Vertex> usableBridges =
null;
1410 if (newRingIsAromatic)
1420 chosenPairsSet.get(0).apA.getAPClass(),
1421 chosenPairsSet.get(0).apB.getAPClass(),
1426 if (usableBridges.size()==0)
1435 List<Vertex> szBiasedUsableBridges =
new ArrayList<Vertex>();
1436 for (
Vertex candidateBridge : usableBridges)
1438 int thisBridgeLength = (int) candidateBridge.getProperty(
1441 int resultingRingSize = existingBridgeLength + thisBridgeLength;
1451 for (
int z=0; z<weigth; z++)
1453 szBiasedUsableBridges.add(candidateBridge);
1457 if (szBiasedUsableBridges.size()==0)
1466 List<AttachmentPoint> apsInFusion =
new ArrayList<AttachmentPoint>();
1467 int[] idApOnBridge =
new int[2];
1468 if (newRingIsAromatic)
1474 idApOnBridge[0] = apsInFusion.get(0).getIndexInOwner();
1475 idApOnBridge[1] = apsInFusion.get(1).getIndexInOwner();
1477 idApOnBridge[0] = apsInFusion.get(1).getIndexInOwner();
1478 idApOnBridge[1] = apsInFusion.get(0).getIndexInOwner();
1481 idApOnBridge[0] = Integer.parseInt(incomingVertex.
getProperty(
1483 idApOnBridge[1] = Integer.parseInt(incomingVertex.
getProperty(
1487 if (idApOnBridge[0] == idApOnBridge[1])
1493 boolean done =
false;
1498 if (apHead == apTail
1510 Vertex rcvBridge = fragSpace.getPolarizedRCV(
true);
1512 rcvBridge.
getAP(0));
1514 Vertex rcvTail = fragSpace.getPolarizedRCV(
false);
1516 graph.
addRing(rcvBridge, rcvTail);
1521 vertex.getGraphOwner().addCappingGroups(fragSpace);
1544 boolean symmetryOnAps,
1548 return extendGraph(curVertex, extend, symmetryOnAps,
false, -1, -1,
1579 boolean symmetryOnAps,
1602 boolean status =
false;
1605 if (!curVrtx.hasFreeAP())
1610 DGraph molGraph = curVrtx.getGraphOwner();
1611 int lvl = molGraph.
getLevel(curVrtx);
1613 ArrayList<Long> addedVertices =
new ArrayList<>();
1615 List<AttachmentPoint> lstDaps = curVrtx.getAttachmentPoints();
1616 List<AttachmentPoint> toDoAPs =
new ArrayList<AttachmentPoint>();
1617 toDoAPs.addAll(lstDaps);
1618 for (
int i=0; i<lstDaps.size(); i++)
1639 boolean allowOnlyRingClosure =
false;
1651 double extendGraphProb = molSizeProb * byLevelProb * crowdingProb;
1652 boolean fgrow = settings.getRandomizer().nextBoolean(
1657 && settings.getRandomizer().nextBoolean(byLevelProb
1660 allowOnlyRingClosure =
true;
1668 if (!allowOnlyRingClosure
1673 apId, molGraph, addedVertices, settings);
1682 if (allowOnlyRingClosure)
1707 if ((curVrtx.getGraphOwner().getHeavyAtomsCount() +
1717 settings.getSymmetryProbability(),
1720 if (curVrtx.getSymmetricAPs(ap).size()!=0
1721 && (cpOnSymAPs || symmetryOnAps)
1722 && !allowOnlyRingClosure)
1724 symAPs.addAll(curVrtx.getSymmetricAPs(ap));
1727 boolean allOnSameSrc =
true;
1730 if (!symAP.hasSameSrcAtom(ap))
1732 allOnSameSrc =
false;
1749 crowdedness = crowdedness + 1;
1753 double shot = settings.getRandomizer().nextDouble();
1762 crowdedness, settings);
1764 if (shot > crowdProb)
1768 crowdedness = crowdedness + 1;
1788 symVerts.
add(curVrtx);
1792 if ((curVrtx.getGraphOwner().getHeavyAtomsCount() +
1794 * symAPs.size()) > maxHeavyAtoms)
1800 List<AttachmentPoint> allAPsFromSymVerts =
new ArrayList<>();
1801 for (
Vertex symVrt : symVerts)
1806 apOnVrt.getIndexInOwner());
1810 if (apOnVrt.sameAs(apOnSymVrt)
1812 && !symAPs.contains(apOnSymVrt))
1814 allAPsFromSymVerts.add(apOnSymVrt);
1818 symAPs.addAll(allAPsFromSymVerts);
1826 if (!symAP.isAvailable())
1842 addedVertices.add(newVrtId);
1843 newSymSetOfVertices.
add(fragVertex);
1847 if (newSymSetOfVertices.size() > 1)
1856 for (
int i=0; i<addedVertices.size(); i++)
1858 long vid = addedVertices.get(i);
1864 if (addedVertices.size() > 0)
1909 int dapidx,
int chosenVrtxIdx,
int chosenApId,
1912 List<AttachmentPoint> lstDaps = curVertex.getAttachmentPoints();
1918 if (!fragSpace.useAPclassBasedApproach())
1920 int fid = fragSpace.getRandomizer().nextInt(
1921 fragSpace.getFragmentLibrary().size());
1926 List<IdFragmentAndAP> candidates =
1927 fragSpace.getFragAPsCompatibleWithClass(
1929 if (candidates.size() > 0)
1931 if (chosenVrtxIdx>-1 && chosenApId>-1)
1937 res = fragSpace.getRandomizer().randomlyChooseOne(candidates);
1963 List<Vertex> rcvs = fragSpace.getRCVs();
1965 if (!fragSpace.useAPclassBasedApproach())
1969 List<Vertex> candidates = fragSpace.getRCVsForAPClass(
1971 if (candidates.size() > 0)
1991 boolean res =
false;
2001 curVertex, dapidx, molGraph);
2012 int numCands = lscFfCc.size();
2015 int chosenId = settings.getRandomizer().nextInt(numCands);
2017 ArrayList<Integer> newFragIds = chosenFfCc.
getFragIDs();
2018 int molIdNewFrag = newFragIds.get(0);
2020 int dapNewFrag = newFragIds.get(2);
2021 if (molIdNewFrag != -1)
2025 newvid, molIdNewFrag, typeNewFrag,
2028 molGraph.appendVertexOnAP(curVertex.getAP(dapidx),
2029 newVrtx.
getAP(dapNewFrag));
2033 addedVertices.add(newvid);
2035 molGraph.getClosableChains().removeAll(
2037 APClass apc = curVertex.getAttachmentPoints().get(
2038 dapidx).getAPClass();
2041 settings.getSymmetryProbability(),
2050 String msg =
"BUG: Incorrect vertex num. Contact author.";
2051 settings.getLogger().log(Level.SEVERE, msg);
2127 ArrayList<FragForClosabChains> lstChosenFfCc =
2128 new ArrayList<FragForClosabChains>();
2130 if (molGraph.getClosableChains().size() == 0)
2132 return lstChosenFfCc;
2139 int posInCc = cc.involvesVertex(curVertex);
2154 if (cc.getSize() > (posInCc+1))
2157 ChainLink nextChainLink = cc.getLink(posInCc+1);
2158 nfid = nextChainLink.
getIdx();
2170 if ((posInCc-1) >= 0)
2173 ChainLink nextChainLink = cc.getLink(posInCc-1);
2174 nfid = nextChainLink.
getIdx();
2185 ArrayList<Integer> eligibleFrgId =
new ArrayList<Integer>();
2186 eligibleFrgId.add(nfid);
2187 eligibleFrgId.add(nfty.
toOldInt());
2188 eligibleFrgId.add(nfap);
2189 boolean found =
false;
2192 int fidA = ffcc.getFragIDs().get(0);
2194 int fapA = ffcc.getFragIDs().get(2);
2195 if (nfid==fidA && nfty==ftyA && nfap==fapA)
2198 ffcc.getCompatibleCC().add(cc);
2202 ffcc.getIncompatibleCC().add(cc);
2207 ArrayList<ClosableChain> compatChains =
2208 new ArrayList<ClosableChain>();
2209 ArrayList<ClosableChain> incompatChains =
2210 new ArrayList<ClosableChain>();
2213 incompatChains.addAll(otherFfCc.getCompatibleCC());
2221 lstChosenFfCc.add(newChosenCc);
2228 Edge edge = molGraph.getEdgeWithParent(
2229 curVertex.getVertexId());
2236 int posInCc = cc.involvesVertexAndAP(curVertex, dapidx, chidAp);
2250 List<Integer> altertnativeDirections =
new ArrayList<>();
2251 altertnativeDirections.add(-1);
2252 altertnativeDirections.add(+1);
2253 for (
int altDir : altertnativeDirections)
2255 ChainLink parentLink = cc.getLink(posInCc + altDir);
2256 int pLnkId = parentLink.
getIdx();
2269 if (pLnkId==prntId && pLnkTyp==prntTyp && pLnkAp == prntAp &&
2272 if (cc.getSize() > (posInCc+altDir)
2273 && (posInCc+altDir) >= 0)
2275 ChainLink nextChainLink = cc.getLink(posInCc + altDir);
2276 nfid = nextChainLink.
getIdx();
2293 ArrayList<Integer> eligibleFrgId =
new ArrayList<Integer>();
2294 eligibleFrgId.add(nfid);
2295 eligibleFrgId.add(nfty.
toOldInt());
2296 eligibleFrgId.add(nfap);
2297 boolean found =
false;
2300 int fidA = ffcc.getFragIDs().get(0);
2302 int fapA = ffcc.getFragIDs().get(2);
2303 if (nfid==fidA && nfty==ftyA && nfap==fapA)
2306 ffcc.getCompatibleCC().add(cc);
2310 ffcc.getIncompatibleCC().add(cc);
2315 ArrayList<ClosableChain> compatChains =
2316 new ArrayList<ClosableChain>();
2317 ArrayList<ClosableChain> incompatChains =
2318 new ArrayList<ClosableChain>();
2321 incompatChains.addAll(otherFfCc.getCompatibleCC());
2328 lstChosenFfCc.add(newChosenCc);
2332 return lstChosenFfCc;
2371 DGraph gA = site.getA().get(0).getGraphOwner();
2372 DGraph gB = site.getB().get(0).getGraphOwner();
2375 List<AttachmentPoint> allAPsOnA = gA.
getSubgraphAPs(site.getA());
2376 List<AttachmentPoint> allAPsOnB = gB.
getSubgraphAPs(site.getB());
2380 List<AttachmentPoint> needyAPsOnA = site.getAPsNeedingMappingA();
2381 List<AttachmentPoint> needyAPsOnB = site.getAPsNeedingMappingB();
2388 if (!ap.isSrcInUserThroughout())
2397 if (!ap.isSrcInUserThroughout())
2404 if (apToParentA==
null || apToParentB==
null)
2407 +
"point connecting a subgraph to the rest of the graph. "
2408 +
"This violates assumption that crossover does not "
2409 +
"involve scaffold or vertexes without parent.");
2422 fixedRootAPs.put(apToParentA, apToParentB);
2428 allAPsOnA, needyAPsOnA,
2429 allAPsOnB, needyAPsOnB, fixedRootAPs,
2433 maxAPMappingCombinations);
2449 LinkedHashMap<AttachmentPoint,AttachmentPoint>
2450 apMapA =
new LinkedHashMap<AttachmentPoint,AttachmentPoint>();
2451 LinkedHashMap<AttachmentPoint,AttachmentPoint>
2452 apMapB =
new LinkedHashMap<AttachmentPoint,AttachmentPoint>();
2467 apMapA.put(apOnA, apOnSubGraphB);
2468 apMapB.put(apOnB, apOnSubGraphA);
2495 double symmetryProbability,
Randomizer randomizer)
2529 List<Vertex> mutable = graph.getMutableSites(
2530 settings.getExcludedMutationTypes());
2538 Vertex vA = site.apA.getOwner();
2539 Vertex vB = site.apB.getOwner();
2540 if (!mutable.contains(vA))
2542 if (!mutable.contains(vB))
2547 if (mutable.size() == 0)
2550 String msg =
"Graph has no mutable site. Mutation aborted.";
2551 settings.getLogger().info(msg);
2554 boolean doneMutation =
true;
2556 settings.getMultiSiteMutationWeights(),
2557 settings.getRandomizer().nextDouble());
2558 for (
int i=0; i<numberOfMutations; i++)
2562 mutable = graph.getMutableSites(
2563 settings.getExcludedMutationTypes());
2566 Vertex v = settings.getRandomizer().randomlyChooseOne(mutable);
2571 return doneMutation;
2592 List<MutationType> mTypes = vertex.getMutationTypes(
2593 settings.getExcludedMutationTypes());
2594 if (mTypes.size() == 0)
2598 MutationType mType = settings.getRandomizer().randomlyChooseOne(mTypes);
2620 int pos = vertex.getGraphOwner().
indexOf(vertex);
2624 }
catch (IllegalArgumentException|NullPointerException e)
2626 String debugFile =
"failedMutation_" + mType
2627 +
"_" + vertex.getVertexId() +
"(" + pos +
")_"
2628 + settings.timeStamp +
".sdf";
2630 settings.getLogger(), settings.getRandomizer());
2631 settings.getLogger().warning(
"Fatal exception while performing "
2632 +
"mutation. See file '" + debugFile +
"' to reproduce the "
2677 DGraph graph = vertex.getGraphOwner();
2681 settings.getLogger().info(
"Vertex has no owner - "
2682 +
"Mutation aborted");
2685 if (!vertex.getMutationTypes(settings.getExcludedMutationTypes())
2689 settings.getLogger().info(
"Vertex does not allow mutation type "
2690 +
"'" + mType +
"' - Mutation aborted");
2695 int positionOfVertex = graph.
indexOf(vertex);
2702 +
" (" + positionOfVertex +
")";
2705 boolean done =
false;
2709 done =
rebuildBranch(vertex, force, chosenVrtxIdx, chosenApId,
2742 List<Integer> candidates =
new ArrayList<Integer>();
2745 candidates.add(c.getEdgeToParent().getSrcAP()
2746 .getIndexInOwner());
2748 if (candidates.size() == 0)
2754 chosenApId = settings.getRandomizer().randomlyChooseOne(
2757 done =
extendLink(vertex, chosenApId, chosenVrtxIdx, mnt,
2779 vertex.getGraphOwner().removeCappingGroupsOn(vertex);
2780 done =
extendGraph(vertex,
false,
false, force, chosenVrtxIdx,
2781 chosenApId, settings);
2793 String msg =
"Mutation '" + mType.toString() +
"' on vertex "
2794 + vertex.toString() +
" (position " + positionOfVertex
2795 +
" in graph " + graphId+
"): ";
2807 msg = msg +
"unsuccessful";
2809 settings.getLogger().info(msg);
General set of constants used in DENOPTIM.
static final String VRTPROPBRIDGELENGTH
Name of Vertex property used to record how long a ring-closing bridge is.
static final String VRTPROPBRIDGEEND_B
Name of Vertex property used to record which AP is selected for bridge formation on side 'B'.
static final Object STOREDVID
Key of the property remembering vertex IDs.
static final String VRTPROPBRIDGEEND_A
Name of Vertex property used to record which AP is selected for bridge formation on side 'A'.
SMARTS-based rules to identify potential bridge head atoms for ring fusion operations.
int getExistingBridgeLength()
int[] getAllowedBridgeLength()
An utility class to encapsulate the search for an AttachmentPoint-AttachmentPoint mapping.
APMapping getChosenAPMapping()
Returns the AttachmentPoint-AttachmentPoint mapping chosen among the possible mappings.
boolean foundMapping()
Returns true if any mapping has been found.
static final int DEFAULT_MAX_COMBS
Default maximum number of combinations when none is specified.
Class defining a space of building blocks.
boolean imposeSymmetryOnAPsOfClass(APClass apClass)
Checks if the symmetry settings impose use of symmetry on attachment points of the given AP class.
Parameters defining the fragment space.
FragmentSpace getFragmentSpace()
An utility class to encapsulate the search for vertexes that satisfy constraints.
Vertex getChosenAlternativeLink()
Returns the vertex chosen as alternative.
APMapping getChosenAPMapping()
Returns the AP mapping that allows the usage of the vertex chosen either as alternative to be install...
boolean foundAlternativeLink()
Data structure containing information that identifies a single AP of a vertex/fragment.
Helper methods for the genetic algorithm.
static double getGrowthByLevelProbability(int level, GAParameters settings)
Calculates the probability of adding a fragment to the given level.
static int chooseNumberOfSitesToMutate(double[] multiSiteMutationProb, double hit)
Takes a decision on how many sites to mutate on a candidate.
static List< Vertex > getUsableAliphaticBridges(APClass apcA, APClass apcB, int[] allowedLengths, FragmentSpace fragSpace)
Finds all vertexes that can be used as aliphatic bridge.
static double getCrowdingProbability(AttachmentPoint ap, GAParameters settings)
Calculated the probability of using and attachment point rooted on an atom that is holding other atta...
static List< List< RelatedAPPair > > searchRingFusionSites(DGraph graph, GAParameters gaParams)
static int getCrowdedness(AttachmentPoint ap)
Calculate the current crowdedness of the given attachment point.
static List< Vertex > getUsableAromaticBridges(String elInIncomingFrag, int[] allowedLengths, FragmentSpace fragSpace)
Finds all vertexes that can be used as aromatic bridge, i.e., can be used to create an aromatic ring ...
static double getMolSizeProbability(DGraph graph, GAParameters settings)
Calculated the probability of extending a graph based on the current size of the molecular representa...
Private class representing a selected closable chain of fragments.
ArrayList< ClosableChain > incompatChains
FragForClosabChains(ArrayList< ClosableChain > compatChains, ArrayList< ClosableChain > incompatChains, ArrayList< Integer > fragIds)
ArrayList< Integer > fragIds
ArrayList< ClosableChain > compatChains
ArrayList< ClosableChain > getCompatibleCC()
ArrayList< ClosableChain > getIncompatibleCC()
void addCompatibleCC(ClosableChain icc)
ArrayList< Integer > getFragIDs()
Collection of operators meant to alter graphs and associated utilities.
static IdFragmentAndAP getFrgApForSrcAp(Vertex curVertex, int dapidx, FragmentSpace fragSpace)
Select a compatible fragment for the given attachment point.
static boolean performMutation(Vertex vertex, MutationType mType, boolean force, int chosenVrtxIdx, int chosenApId, Monitor mnt, GAParameters settings)
Mutates the given vertex according to the given mutation type, if possible.
static boolean extendGraph(Vertex curVrtx, boolean extend, boolean symmetryOnAps, boolean force, int chosenVrtxIdx, int chosenApId, GAParameters settings)
function that will keep extending the graph.
static boolean extendLink(Vertex vertex, int chosenAPId, Monitor mnt, FragmentSpace fragSpace)
Inserts a vertex in between two connected vertexes that are identified by the one vertex holding the ...
static boolean applySymmetry(boolean apclassImposed, double symmetryProbability, Randomizer randomizer)
Decides whether to apply constitutional symmetry or not.
static void processPermutationOfEndPoints(Vertex[] pair, List< Vertex[]> chosenSequenceOfEndpoints, List< XoverSite > collector, FragmentSpace fragSpace, int maxAPMappingCombinations)
Given a pair of seed vertexes that define where a pair of subgraphs stars in the corresponding origin...
static boolean performMutation(Vertex vertex, MutationType mType, Monitor mnt, GAParameters settings)
Mutates the given vertex according to the given mutation type, if possible.
static boolean substituteLink(Vertex vertex, int chosenVrtxIdx, Monitor mnt, FragmentSpace fragSpace)
Substitutes a vertex while keeping its surrounding.
static List< XoverSite > locateCompatibleXOverPoints(DGraph graphA, DGraph graphB, FragmentSpace fragSpace, int maxSizeXoverSubGraph, int maxCompatibleVrtxPairs, int maxEndPointsCombinations, int maxEndPointsPermutations, int maxAPMappingCombinations)
Identify crossover sites, i.e., subgraphs that can be swapped between two graphs (i....
static boolean isCrossoverPossible(Edge eA, Edge eB, FragmentSpace fragSpace)
Evaluate AP class-compatibility of a pair of edges with respect to crossover.
static boolean attachFragmentInClosableChain(Vertex curVertex, int dapidx, DGraph molGraph, ArrayList< Long > addedVertices, GAParameters settings)
static boolean extendGraph(Vertex curVertex, boolean extend, boolean symmetryOnAps, GAParameters settings)
function that will keep extending the graph according to the growth/substitution probability.
static ArrayList< FragForClosabChains > getFragmentForClosableChain(Vertex curVertex, int dapidx, DGraph molGraph)
Method to select fragments that increase the likeliness of generating closable chains.
static boolean performMutation(Vertex vertex, Monitor mnt, GAParameters settings)
Tries to do mutate the given vertex.
static IdFragmentAndAP getFrgApForSrcAp(Vertex curVertex, int dapidx, int chosenVrtxIdx, int chosenApId, FragmentSpace fragSpace)
Select a compatible fragment for the given attachment point.
static IdFragmentAndAP getRCVForSrcAp(Vertex curVertex, int dapidx, FragmentSpace fragSpace)
Select a compatible ring-closing vertex for the given attachment point.
static boolean performCrossover(XoverSite site, FragmentSpace fragSpace, int maxAPMappingCombinations)
Performs crossover as defined by the given XoverSite.
static boolean deleteFragment(Vertex vertex)
Deletion mutation removes the vertex and also the symmetric partners on its parent.
static boolean rebuildBranch(Vertex vertex, boolean force, int chosenVrtxIdx, int chosenApId, GAParameters settings)
Substitutes a vertex and any child branch.
static boolean addFusedRing(Vertex vertex, Monitor mnt, boolean force, FragmentSpace fragSpace, GAParameters settings)
Tries to add a fused ring using a pair of free APs, one of which on the given vertex.
static boolean deleteLink(Vertex vertex, int chosenVrtxIdx, Monitor mnt, FragmentSpace fragSpace)
Removes a vertex while merging as many of the child branches into the parent vertex.
static void processCombinationOfEndPoints(Vertex[] pair, List< Vertex[]> cominationOfEnds, List< XoverSite > collector, FragmentSpace fragSpace, int maxEndPointsPermutations, int maxAPMappingCombinations)
Given a pair of seed vertexes that define where a pair of subgraphs stars in the corresponding origin...
static boolean extendLink(Vertex vertex, int chosenAPId, int chosenNewVrtxId, Monitor mnt, FragmentSpace fragSpace)
Inserts a vertex in between two connected vertexes that are identified by the one vertex holding the ...
static boolean performMutation(DGraph graph, Monitor mnt, GAParameters settings)
Tries to do mutate the given graph.
static boolean addRing(Vertex vertex, Monitor mnt, boolean force, FragmentSpace fragSpace, GAParameters settings)
Tries to use any free AP of the given vertex to close ring in the graph by adding a chord.
static boolean extendLink(Edge edge, int chosenBBIdx, Monitor mnt, FragmentSpace fragSpace)
Replace an edge with two edges with a new vertex in between, thus inserting a vertex in between two d...
static void checkAndAddXoverSites(FragmentSpace fragSpace, List< Vertex > subGraphA, List< Vertex > subGraphB, CrossoverType xoverType, List< XoverSite > collector, int maxAPMappingCombinations)
Here we check that the given subgraphs have a mapping that allows to swap them, and full fill any oth...
static boolean deleteChain(Vertex vertex, Monitor mnt, FragmentSpace fragSpace)
Deletes the given vertex and all other vertexes that are not connected to more than 2 non-capping gro...
static boolean performCrossover(XoverSite site, FragmentSpace fragSpace)
Performs the crossover that swaps the two subgraphs defining the given XoverSite.
This class collects the data identifying the subgraphs that would be swapped by a crossover event.
boolean isCPMapCompatibleWith(APClass other, FragmentSpace fragSpace)
Check compatibility as defined in the compatibility matrix considering this AP as source and the othe...
Class representing a mapping between attachment points (APs).
LinkedHashMap< Integer, Integer > toIntMappig()
Produces an index-based version of this mapping where each index represents the attachment point as i...
An attachment point (AP) is a possibility to attach a Vertex onto the vertex holding the AP (i....
AttachmentPoint getLinkedAP()
Gets the attachment point (AP) that is connected to this AP via the edge user.
APClass getAPClass()
Returns the Attachment Point class.
boolean isAvailable()
Check availability of this attachment point.
boolean isAvailableThroughout()
Check availability of this attachment point throughout the graph level, i.e., check also across the i...
Edge getEdgeUserThroughout()
Gets the edge that is using this AP, or null if no edge is using this AP.
Container for the list of vertices and the edges that connect them.
boolean removeVertexAndWeld(Vertex vertex, FragmentSpace fragSpace)
Remove a given vertex belonging to this graph and re-connects the resulting graph branches as much as...
boolean replaceVertex(Vertex vertex, int bbId, BBType bbt, LinkedHashMap< Integer, Integer > apIdMap, FragmentSpace fragSpace)
Replaced a given vertex belonging to this graph with a new vertex generated specifically for this pur...
Vertex getVertexWithId(long vid)
Searches for a vertex with the given identifier.
DGraph extractSubgraph(int index)
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree f...
boolean isIsomorphicTo(DGraph other)
Checks if this graph is "DENOPTIM-isomorphic" to the other one given.
ArrayList< Ring > getRingsInvolvingVertex(Vertex v)
Returns the list of rings that include the given vertex in their fundamental cycle.
void getChildrenTree(Vertex vertex, List< Vertex > children)
Gets all the children of the current vertex recursively.
void removeVertex(Vertex vertex)
Remove a vertex from this graph.
int indexOf(Vertex v)
Returns the index of a vertex in the list of vertices of this graph.
Vertex getVertexAtPosition(int pos)
Returns the vertex that is in the given position of the list of vertices belonging to this graph.
Vertex getDeepestAmongThese(List< Vertex > list)
Identify the oldest ancestor (i.e., most great grandparent) in the given collection.
String getBranchIdOfVertexAsStr(Vertex v)
Returns the branch identifier as a literal string.
List< AttachmentPoint > getAvailableAPsThroughout()
Returns the list of attachment points contained in this graph that are available throughout the templ...
void appendVertexOnAP(AttachmentPoint srcAP, AttachmentPoint trgAP)
Append a vertex to this graph: adds the new vertex to the list of vertices belonging to the graph,...
List< AttachmentPoint > getInterfaceAPs(List< Vertex > subGraphB)
Searches for all AttachmentPoints that represent the interface between a subgraph,...
DGraph clone()
Returns almost "deep-copy" of this graph.
boolean replaceSubGraph(List< Vertex > subGrpVrtxs, DGraph incomingGraph, LinkedHashMap< AttachmentPoint, AttachmentPoint > apMap, FragmentSpace fragSpace)
Replaced the subgraph represented by a given collection of vertices that belong to this graph.
int getLevel(Vertex v)
Calculates the level of a vertex in this graph.
void addSymmetricSetOfVertices(SymmetricVertexes symSet)
Adds a symmetric set of vertices to this graph.
SymmetricVertexes getSymSetForVertex(Vertex v)
Returns the set of vertexes symmetric to the given one.
List< AttachmentPoint > getSubgraphAPs(List< Vertex > subGraphB)
Searches for all AttachmentPoints that are owned by vertices in a subgraph but either available or us...
boolean hasSymmetryInvolvingVertex(Vertex v)
boolean insertVertex(Edge edge, int bbId, BBType bbt, LinkedHashMap< AttachmentPoint, Integer > apMap, FragmentSpace fragSpace)
Inserts a given vertex in between two vertices connected by the given edge.
void getChildTreeLimited(Vertex vertex, List< Vertex > children, boolean stopBeforeRCVs)
Gets all the children of the current vertex recursively.
boolean removeBranchStartingAt(Vertex v, boolean symmetry)
Deletes the branch, i.e., the specified vertex and its children.
Template getTemplateJacket()
boolean removeChainUpToBranching(Vertex v, FragmentSpace fragSpace)
Mutates the graph by removing the chain where a given vertex is located up to the first branching (i....
void setLocalMsg(String msg)
boolean isIsostructuralTo(DGraph other)
Checks if this graph is "DENOPTIM-isostructural" to the other one given.
This class represents the edge between two vertices.
AttachmentPoint getTrgAP()
AttachmentPoint getSrcAP()
This class represents the closure of a ring in a spanning tree.
A collection of AttachmentPoints that are related by a relation that we call "symmetry",...
boolean add(T item)
Adds an item to this list, if not already present.
A collection of Vertexs that are related by a relation that we call "symmetry", even though this clas...
ContractLevel getContractLevel()
Returns the contract level of this template, i.e., to what extent the content of this template can be...
void clearIAtomContainer()
Removes the molecular representation.
A vertex is a data structure that has an identity and holds a list of AttachmentPoints.
abstract Vertex clone()
Returns a deep-copy of this vertex.
List< AttachmentPoint > getAPsWithAPClassStartingWith(String root)
Finds only APs that have APClass starting with the given string.
int getBuildingBlockId()
Returns the index of the building block that should correspond to the position of the building block ...
Edge getEdgeToParent()
Looks into the edges that use any of the APs that belong to this vertex and returns the edge that has...
void setVertexId(long vertexId2)
Vertex getParent()
Looks into the edges that use any of the APs that belong to this vertex and returns the vertex which ...
Vertex.BBType getBuildingBlockType()
DGraph getGraphOwner()
Returns the graph this vertex belongs to or null.
ArrayList< Vertex > getChilddren()
Looks into the edges that use any of the APs that belong to this vertex and returns the list of verti...
Object getProperty(Object property)
abstract int getHeavyAtomsCount()
ArrayList< AttachmentPoint > getFreeAPThroughout()
Gets attachment points that are availability throughout the graph level, i.e., checks also across the...
AttachmentPoint getAP(int i)
Get attachment point i on this vertex.
static Vertex newVertexFromLibrary(int bbId, Vertex.BBType bbt, FragmentSpace fragSpace)
Builds a new molecular fragment kind of vertex.
ChainLink represents a vertex in a closable chain.
Vertex.BBType getFragType()
ClosableChain represents a chain of fragments (chain links) that is closable (or candidate closable).
This object represents a path in a DGraph.
int getPathLength()
Returns the length of the list of edges involved in this path.
List< Vertex > getVertecesPath()
Returns the list of verteces involved.
A class for iterating over sets of ring combinations generated by considering any constrain and setti...
The RingClosingAttractor represent the available valence/connection that allows to close a ring.
static final Map< APClass, APClass > RCAAPCMAP
Recognized APClasses on RingClosingAttractor and compatible types.
Parameters and setting related to handling ring closures.
void allowRingClosures(boolean value)
List< Integer > getRingSizeBias()
boolean selectFragmentsFromClosableChains()
Utility methods for input/output.
static void writeGraphToSDF(File file, DGraph graph, boolean append, boolean make3D, Logger logger, Randomizer randomizer)
Writes the graph to SDF file.
A collection of counters user to count actions taken by the evolutionary algorithm.
Tool to build build three-dimensional (3D) tree-like molecular structures from DGraph.
void setAlignBBsIn3D(boolean align)
Sets the flag that controls whether building blocks have to be aligned according to the AP vectors or...
IAtomContainer convertGraphTo3DAtomContainer(DGraph graph)
Created a three-dimensional molecular representation from a given DGraph.
RunTimeParameters getParameters(ParametersType type)
Randomizer getRandomizer()
Returns the current program-specific randomizer.
Parameters for genetic algorithm.
static synchronized void ensureVertexIDConsistency(long l)
Method used to ensure consistency between internal atomic integer and vertex id from imported graphs.
static synchronized long getUniqueVertexIndex()
Unique counter for the number of graph vertices generated.
Tool to generate random numbers and random decisions.
boolean nextBoolean()
Returns the next pseudo-random, uniformly distributed boolean value from this random number generator...
public< T > T randomlyChooseOne(Collection< T > c)
Chooses one member among the given collection.
public< T > void shuffle(List< T > list)
Fisher-Yates shuffle of the given list.
Enum specifying to what extent the template's inner graph can be changed.
FIXED
Inner graphs are effectively equivalent to the Fragment class, as no change in the inner structure is...
FIXED_STRUCT
Inner graph keep the same structure, but the identify of vertices can change.
The type of building block.
static BBType parseInt(int i)
Translates the integer into the enum.
FAILEDMUTATTEMTS_PERFORM_NOADDLINK_EDIT
FAILEDMUTATTEMTS_PERFORM_NODELETE
FAILEDMUTATTEMTS_PERFORM_NOADDRING
FAILEDMUTATTEMTS_PERFORM_NOADDLINK_FIND
FAILEDMUTATTEMTS_PERFORM_NODELLINK_EDIT
FAILEDMUTATTEMTS_PERFORM_NOADDRING_NORINGCOMB
FAILEDMUTATTEMTS_PERFORM_NOADDFUSEDRING_NOSITE
FAILEDMUTATTEMTS_PERFORM_NOADDFUSEDRING_NOBRIDGE
FAILEDMUTATTEMTS_PERFORM_NOOWNER
FAILEDMUTATTEMTS_PERFORM_NOADDLINK
FAILEDMUTATTEMTS_PERFORM_NOEXTEND
FAILEDMUTATTEMTS_PERFORM_NOMUTSITE
FAILEDMUTATTEMTS_PERFORM_NOADDFUSEDRING_NOFREEAP
FAILEDMUTATTEMTS_PERFORM_NODELETECHAIN
FAILEDMUTATTEMTS_PERFORM_NOCHANGELINK_EDIT
FAILEDMUTATTEMTS_PERFORM_NOCHANGELINK
FAILEDMUTATTEMTS_PERFORM_NOCHANGEBRANCH
FAILEDMUTATTEMTS_PERFORM_NOADDRING_NOFREEAP
FAILEDMUTATTEMTS_PERFORM_BADMUTTYPE
FAILEDMUTATTEMTS_PERFORM_NOCHANGELINK_FIND
Identifier of the type of parameters.
FS_PARAMS
Parameters pertaining the definition of the fragment space.
RC_PARAMS
Parameters pertaining to ring closures in graphs.
Types of crossover defined.
SUBGRAPH
Swaps a portion of a branch trying to retain cyclicity.
BRANCH
Swaps the entire branch starting from a given vertex.
Types of mutation defined in relation to what happens to the target vertex (i.e., the actual mutation...
DELETECHAIN
Removes a vertex and all its neighbors recursively until a branching point, i.e., until a vertex that...