New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StructureDiagramGenerator ignores setBondLength for ring bonds #384
Comments
I'll deprecate that method, the correct way to do this is layout the molecule then scale it. |
It might be useful to have the method work using the set bond length in a
scenario in which you have coordinates for most of the molecule and need to
get coordinates for atoms you added while converting super atom
representations to their expanded representation e.g. OBn to OCc1ccccc1.
Just my two cents.
Ben
…On Nov 17, 2017 6:13 PM, "John Mayfield" ***@***.***> wrote:
I'll deprecate that method, the correct way to do this is layout the
molecule then scale it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#384 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AgM8o2XTIouwEzDhorYLYsxn2X2KsTr6ks5s3hMagaJpZM4QisGN>
.
|
Possible - but abbreviations are best implemented as display shortcuts, the entire structure is laid out and the abbreviations is tagged to simply hide the contracted parts and rename the connections. ChemAxon have this idea that you can contract and expand the physical connection table but this isn't really how it works in the MDL and ChemDraw formats. More here: |
Setting bond length for StructureDiagramGenerator has no affect on the bond length of ring bonds. A minimal demonstration:
SmilesParser sp = new SmilesParser(SilentChemObjectBuilder.getInstance());
IAtomContainer m = null;
m = sp.parseSmiles("CCCCCC1CCCCC1");
StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.setBondLength(28);
sdg.setMolecule(m);
sdg.generateCoordinates();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
MDLV2000Writer writer = new MDLV2000Writer(
baos
);
writer.write((IAtomContainer)sdg.getMolecule());
System.out.println(new String(baos.toByteArray()));
writer.close();
This results in a molecule with very long acyclic bonds and tiny (relatively) ring bonds.
The text was updated successfully, but these errors were encountered: