Skip to content
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

Bug in reaction automapper leads to infinite loop #101

Open
lithom opened this issue Oct 12, 2023 · 0 comments
Open

Bug in reaction automapper leads to infinite loop #101

lithom opened this issue Oct 12, 2023 · 0 comments

Comments

@lithom
Copy link
Collaborator

lithom commented Oct 12, 2023

When using the JEditableChemistryView with a specific reactant and product, then mapping atoms causes an infinite loop:

Screenshot 2023-10-12 132125

IDCodes in attached file:
idcodes.txt

Mapping the first atom outside the ring from educt to product causes the following output:

MCS Result: R=0 P=0 #Atoms=3
MCS Result: R=0 P=0 #Atoms=3
MCS Result: R=0 P=0 #Atoms=3
MCS Result: R=0 P=0 #Atoms=3
.
... continues forever

Code to reproduce:

public class test_a {
    public static void main(String args[]) {
        IDCodeParser icp = new IDCodeParser();
        StereoMolecule reactant = new StereoMolecule();
        StereoMolecule product  = new StereoMolecule();
        icp.parse(reactant, "dmtD@@QIeyVUZh@@@pcKTwCJ`");
        icp.parse(product, "dk\\D@@SHheIhTf{SZj`@`@vhYWS@");
        JEditableChemistryView view_a = new JEditableChemistryView(1);
        Reaction rxn = new Reaction();
        rxn.setFragment(true);
        rxn.addReactant(reactant);
        rxn.addProduct(product);
        view_a.setContent(rxn);
        JFrame fi = new JFrame();
        fi.getContentPane().setLayout(new BorderLayout());
        fi.getContentPane().add(view_a,BorderLayout.CENTER);
        fi.setSize(800,600);
        fi.setVisible(true);
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant