Closed biotech7 closed 1 year ago
This is possible using the CDK depict Java API but I would prefer to not add this to the front end since you can do it with more flexibility with HTML/JS/CSS.
Here is it using the API BTW
IChemObjectBuilder builder = SilentChemObjectBuilder.getInstance();
SmilesParser smipar = new SmilesParser(builder);
List<IAtomContainer> molecules = new ArrayList<>();
molecules.add(smipar.parseSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C caffeine"));
molecules.add(smipar.parseSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C caffeine"));
molecules.add(smipar.parseSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C caffeine"));
new DepictionGenerator().withMolTitle()
.depict(molecules, 1, 3)
.writeTo("/tmp/tmp.svg");
Hi,John, based on multiple extended smiles like: "CN1C=NC2=C1C(=O)N(C(=O)N2C)C caffeine.CN1C=NC2=C1C(=O)N(C(=O)N2C)C caffeine.CN1C=NC2=C1C(=O)N(C(=O)N2C)C caffeine" to generate multiple structures in one image , which contain title informations look like followiing. is it applicabale?