예제 #1
0
파일: bfs.py 프로젝트: ahasgw/Helium
    def test_bfs_4(self):
        mol = helium.Molecule()
        SMILES.read('C1CCC(CC)CC1', mol)

        visitor = helium.BFSDebugVisitor()
        helium.breadth_first_search(mol, mol.atom(5), visitor)
        self.compare_file('bfs4.log', visitor.output)
예제 #2
0
파일: bfs.py 프로젝트: ahasgw/Helium
    def test_closure_recorder_visitor(self):
        mol = helium.Molecule()
        SMILES.read('C1CCCCC1', mol)

        visitor = helium.BFSClosureRecorderVisitor()
        helium.breadth_first_search(mol, visitor)
        self.assertListEqual([3], visitor.back_bonds)
예제 #3
0
파일: bfs.py 프로젝트: ahasgw/Helium
    def test_custom_visitor(self):
        mol = helium.Molecule()
        SMILES.read('C1CCC(CC)CC1', mol)

        visitor = BFSTestVisitor()
        helium.breadth_first_search(mol, visitor)
        self.compare_file('bfs1.log', visitor.output)
예제 #4
0
파일: bfs.py 프로젝트: ahasgw/Helium
    def test_atom_order_visitor(self):
        mol = helium.Molecule()
        SMILES.read('CCC', mol)

        visitor = helium.BFSAtomOrderVisitor()
        helium.breadth_first_search(mol, visitor)
        self.assertListEqual([0, 1, 2], visitor.atoms)
예제 #5
0
파일: bfs.py 프로젝트: ahasgw/Helium
    def test_bond_order_visitor(self):
        mol = helium.Molecule()
        SMILES.read('CCC', mol)

        visitor = helium.BFSBondOrderVisitor()
        helium.breadth_first_search(mol, visitor)
        self.assertListEqual([0, 1], visitor.bonds)
예제 #6
0
파일: bfs.py 프로젝트: dualword/Helium
    def test_bfs_4(self):
        mol = helium.Molecule()
        SMILES.read('C1CCC(CC)CC1', mol)

        visitor = helium.BFSDebugVisitor()
        helium.breadth_first_search(mol, mol.atom(5), visitor)
        self.compare_file('bfs4.log', visitor.output)
예제 #7
0
파일: bfs.py 프로젝트: dualword/Helium
    def test_custom_visitor(self):
        mol = helium.Molecule()
        SMILES.read('C1CCC(CC)CC1', mol)

        visitor = BFSTestVisitor()
        helium.breadth_first_search(mol, visitor)
        self.compare_file('bfs1.log', visitor.output)
예제 #8
0
파일: bfs.py 프로젝트: dualword/Helium
    def test_closure_recorder_visitor(self):
        mol = helium.Molecule()
        SMILES.read('C1CCCCC1', mol)

        visitor = helium.BFSClosureRecorderVisitor()
        helium.breadth_first_search(mol, visitor)
        self.assertListEqual([3], visitor.back_bonds)
예제 #9
0
파일: bfs.py 프로젝트: dualword/Helium
    def test_bond_order_visitor(self):
        mol = helium.Molecule()
        SMILES.read('CCC', mol)

        visitor = helium.BFSBondOrderVisitor()
        helium.breadth_first_search(mol, visitor)
        self.assertListEqual([0, 1], visitor.bonds)
예제 #10
0
파일: bfs.py 프로젝트: dualword/Helium
    def test_atom_order_visitor(self):
        mol = helium.Molecule()
        SMILES.read('CCC', mol)

        visitor = helium.BFSAtomOrderVisitor()
        helium.breadth_first_search(mol, visitor)
        self.assertListEqual([0, 1, 2], visitor.atoms)