Loading src/MoleculeDatabase.java +10 −2 Original line number Diff line number Diff line import edu.bu.ec504.project.Atom; import edu.bu.ec504.project.Molecule; import java.io.*; Loading Loading @@ -47,6 +48,13 @@ public class MoleculeDatabase { return; } int numAtoms = molecule.getNumAtoms(); //test if molecule has an unconnected atom for(Atom a: molecule.getAtomArrayList()) if(a.connected.isEmpty()) { printVerbose("Error: molecule file is incorrect (contains unconnected atom)"); return; } if (this.db.containsKey(numAtoms)) { this.db.get(numAtoms).add(molecule); } else { Loading @@ -56,6 +64,7 @@ public class MoleculeDatabase { } } /** * Find isomorphic molecule from the database */ Loading Loading @@ -133,7 +142,6 @@ public class MoleculeDatabase { /** * Download Molecules from PubChem in range [start, end] */ public void downloadPubChem(String start, String end) { String scriptPath = "testcases/downloadPubChem.py"; List<String> filenames = new ArrayList<>(); Loading Loading
src/MoleculeDatabase.java +10 −2 Original line number Diff line number Diff line import edu.bu.ec504.project.Atom; import edu.bu.ec504.project.Molecule; import java.io.*; Loading Loading @@ -47,6 +48,13 @@ public class MoleculeDatabase { return; } int numAtoms = molecule.getNumAtoms(); //test if molecule has an unconnected atom for(Atom a: molecule.getAtomArrayList()) if(a.connected.isEmpty()) { printVerbose("Error: molecule file is incorrect (contains unconnected atom)"); return; } if (this.db.containsKey(numAtoms)) { this.db.get(numAtoms).add(molecule); } else { Loading @@ -56,6 +64,7 @@ public class MoleculeDatabase { } } /** * Find isomorphic molecule from the database */ Loading Loading @@ -133,7 +142,6 @@ public class MoleculeDatabase { /** * Download Molecules from PubChem in range [start, end] */ public void downloadPubChem(String start, String end) { String scriptPath = "testcases/downloadPubChem.py"; List<String> filenames = new ArrayList<>(); Loading