Skip to content

5. Scaffold network generation

Jonas Schaub edited this page Sep 5, 2023 · 4 revisions

Construct a scaffold network from multiple input molecules (see article for details).

ScaffoldGenerator tmpScaffoldGen = new ScaffoldGenerator(); SmilesParser tmpSmiPar = new SmilesParser(SilentChemObjectBuilder.getInstance()); SmilesGenerator tmpSmiGen = tmpScaffoldGen.getSmilesGenerator(); IAtomContainer tmpDiazepam = tmpSmiPar.parseSmiles("CN1C(=O)CN=C(C2=C1C=CC(=C2)Cl)C3=CC=CC=C3");

image

IAtomContainer tmpBromazepam = tmpSmiPar.parseSmiles("C1C(=O)NC2=C(C=C(C=C2)Br)C(=N1)C3=CC=CC=N3");

image

IAtomContainer tmpZolazepam = tmpSmiPar.parseSmiles("CC1=NN(C2=C1C(=NCC(=O)N2C)C3=CC=CC=C3F)C");

image

List tmpInputMolecules = Arrays.asList(tmpDiazepam, tmpBromazepam, tmpZolazepam);

ScaffoldNetwork tmpDiazepinonesNetwork = tmpScaffoldGen.generateScaffoldNetwork(tmpInputMolecules); System.out.println("\nScaffold network:"); //the root scaffolds have level 0 and from there, the level increases. //scaffolds on level 0 either have only one ring or cannot be dissected further, // e.g. complex aromatic systems System.out.println("Max level: " + tmpDiazepinonesNetwork.getMaxLevel());

//Printing all scaffold and parent scaffolds on each level for (int i = 0; i <= tmpDiazepinonesNetwork.getMaxLevel(); i++) { System.out.println("\nLevel " + i + ":"); for (ScaffoldNodeBase tmpNode: tmpDiazepinonesNetwork.getAllNodesOnLevel(i)) { System.out.println(tmpSmiGen.create((IAtomContainer) tmpNode.getMolecule())); } }

//the scaffold network graph can be exported as an adjacency matrix Integer[][] tmpMatrix = tmpDiazepinonesNetwork.getMatrix(); System.out.println("\nMatrix:"); for (int i = 0; i < tmpMatrix.length; i++) { String tmpRow = ""; for (int j = 0; j < tmpMatrix[i].length; j++) { tmpRow += tmpMatrix[i][j] + ", "; } System.out.println(tmpRow); }

//the method getMatrixNodes() returns the scaffolds and parent scaffolds // ordered by their positions in the matrix above System.out.println("\nMatrix nodes:"); for (Integer tmpIndex : tmpDiazepinonesNetwork.getMatrixNodes().keySet()) { System.out.println(tmpIndex + ": " + tmpSmiGen.create( (IAtomContainer) tmpDiazepinonesNetwork.getMatrixNode(tmpIndex).getMolecule())); System.out.println("Level: " + tmpDiazepinonesNetwork.getMatrixNode(tmpIndex).getLevel()); }

Output:
Scaffold network:
Max level: 2

Level 0:
O=C1NC=CC=NC1

image


c1ccccc1

image


n1ccc[nH]1

image


n1ccccc1

image

Level 1:
O=C1NC=CC(=NC1)c2ncccc2

image


O=C1Nc2ccccc2C=NC1

image


O=C1NC=CC(=NC1)c2ccccc2

image


O=C1Nc2[nH]ncc2C=NC1

image

Level 2:
O=C1Nc2[nH]ncc2C(=NC1)c3ccccc3

image


O=C1Nc2ccccc2C(=NC1)c3ccccc3

image


O=C1Nc2ccccc2C(=NC1)c3ncccc3

image

Matrix:
0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0,
1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0,
0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0,
0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,

Matrix nodes:
0: O=C1Nc2ccccc2C(=NC1)c3ccccc3
Level: 2

image


1: O=C1Nc2ccccc2C=NC1
Level: 1

image


2: O=C1NC=CC(=NC1)c2ccccc2
Level: 1

image


3: O=C1NC=CC=NC1
Level: 0

image


4: c1ccccc1
Level: 0

image


5: O=C1Nc2ccccc2C(=NC1)c3ncccc3
Level: 2

image


6: O=C1NC=CC(=NC1)c2ncccc2
Level: 1

image


7: n1ccccc1
Level: 0

image


8: O=C1Nc2[nH]ncc2C(=NC1)c3ccccc3
Level: 2

image


9: O=C1Nc2[nH]ncc2C=NC1
Level: 1

image


10: n1ccc[nH]1
Level: 0

image