Layout (2D coordinates)

Smart and simple layout

This examples shows difference between “smart” and “simple” layout:

# Load structure
file = "data/smart-simple-compare.smi"
array = indigo.createArray()
for mol1 in indigo.iterateSmilesFile(file):
    mol2 = mol1.clone()
    indigo.setOption("smart-layout", "false")
    mol1.layout()
    mol1.setProperty("grid-comment", "simple")
    array.arrayAdd(mol1)
    indigo.setOption("smart-layout", "true")
    mol2.layout()
    mol2.setProperty("grid-comment", "smart")
    array.arrayAdd(mol2)

indigo.setOption("render-bond-length", "14")
indigo.setOption("render-grid-title-property", "grid-comment")
indigo.setOption("render-grid-margins", "20, 10")
indigo.setOption("render-grid-title-offset", "5")

indigoRenderer.renderGridToFile(array, None, 2, 'result.png')
Input: data/smart-simple-compare.smi

../../_images/indigorenderer_480f85be1418d3d012b0aaa65bad63a64a6a2893.svg

Content of the file data/smart-simple-compare.smi with 6 molecules that is used in the example above:

CC1=CC2=C(O)C(C[NH2+]CCN3CC[NH2+]CCN(CC[NH2+]CC4=CC(C)=CC(C[NH2+]CCN5CC[NH2+]CCN(CC[NH2+]C2)CC5)=C4O)CC3)=C1
C1CCC\C=C\C#CCCCCCCC=C=CCCC1
ClP1(Cl)=NP2=3NCCCCCCCCCCNP45=NP(Cl)(Cl)=NP(NCCCCCCCCCCNP(OCCOCCOCCOCCO2)(=N1)N=3)(OCCOCCOCCOCCO4)=N5
C1C[C@H]2CCCCOCC=C3CCCC(C\C=C/[C@H]4OCC[C@H](C[C@@H](C1)O2)O4)O3 |&1:2,18,22,24,c:16|
CC[C@H](C)C1NC(=O)C2CCCN2C(=O)C2CCCN2C(=O)C(NC(=O)[C@H](CO)NC(=O)[C@H](CCCCN)NC(=O)C(NC(=O)C2CSCSCC(NC1=O)C(=O)N[C@@H](CC1=CC=CC=C1)C(=O)N1CCCC1C(=O)N[C@@H](CC(O)=O)C(=O)NCC(=O)N[C@@H](CCCN=C(N)N)C(=O)N2)[C@@H](C)O)[C@@H](C)CC
COC1=CC2=C(OC)C=C1C#CC1=CC(C)=CC(=C1)C#CC#CC1=CC(=CC(C)=C1)C#CC1=CC(OC)=C(C=C1OC)C#CC1=CC(=CC=C1)C#CC1=C(OC)C=C(C#CC3=CC(C)=CC(=C3)C#CC#CC3=CC(=CC(C)=C3)C#CC3=CC(OC)=C(C=C3OC)C#CC3=CC=CC(=C3)C#C2)C(OC)=C1