layout method is extremely slow

41 ogledov
Preskoči na prvo neprebrano sporočilo

pshen...@gmail.com

neprebran,
27. feb. 2017, 04:05:1427. 2. 17
do indigo-bugs
Hello,

could you check the layout method on attached molecule? It works extremely slow... about 5 mins.

I just do 
                var mol = indigo.loadMolecule(molecule);
                mol.layout();

Indigo initiated with the options:
            indigo.setOption("ignore-noncritical-query-features", true);
            indigo.setOption("ignore-stereochemistry-errors", true);

Thanks in advance,
Alexey
very_slow_layout.mol

Savelyev Alexander

neprebran,
14. jul. 2017, 12:49:2314. 7. 17
do indigo-bugs


Dear Alexey,

I can confirm that standard layout work slow with the provided structure. The issue is that the structure is highly symmetric and contains many atoms and bonds (410).
I can only suggest to use a new algorithm for layout: "smart-layout" available from 1.3.0beta. Here one can find some examples
Using the new layout it takes about 40 seconds still.
Also, you can try out max iteration option. For example, the following code works in 0.4 seconds

mol = indigo.loadMoleculeFromFile('layout/very_slow_layout.mol')

indigo
.setOption("smart-layout", "true")
indigo
.setOption("layout-max-iterations", 10)
mol
.layout()

mol
.saveMolfile('layout/smart_out.mol')

And as a result it generates the layout attached

Thanks
Alexander

Odgovori vsem
Odgovori avtorju
Posreduj
0 novih sporočil