コード例 #1
0
    def OnInit(self):
        from frowns import MDL
        reader = MDL.mdlin(open("../test/data/bad.sdf"))

        mol = reader.next()
        wxInitAllImageHandlers()
        frame = wxFrame(None, -1, "", size=(350, 200))

        drawer = self.drawer = wxMoleculeDrawer(frame, drawAromatic=1)
        drawer.setMolecule(mol)
        frame.Show(TRUE)
        return TRUE
コード例 #2
0
    def OnInit(self):
        from frowns import MDL
        reader = MDL.mdlin(open("../test/data/bad.sdf"))
        
        mol = reader.next()
        wxInitAllImageHandlers()
        frame = wxFrame(None, -1, "", size=(350,200))

        
        drawer = self.drawer = wxMoleculeDrawer(frame, drawAromatic=1)
        drawer.setMolecule(mol)
        frame.Show(TRUE)
        return TRUE
コード例 #3
0
from frowns import MDL
from frowns.Depict.MoleculeDrawer import *
file = open("data\\bad.sdf")

reader = MDL.mdlin(file, stripHydrogens=0)
mol = reader.next()

from Tkinter import *
root = Tk()
d = DrawMolHarness(root, mol, "bad")
d.pack(expand=1, fill=BOTH)

mainloop()
コード例 #4
0
        
        d = MoleculeDrawer(self._int,
                           mol,
                           name)
        self.c += 1
        if self.c >= self.cols:
            self.c = 0
            self.r += 1
            self._int.grid_rowconfigure(self.r, weight=1)

        d.grid(row=self.r, column=self.c, sticky="NEWS")


if __name__ == "__main__":
    from frowns import MDL
    reader = MDL.mdlin(open("../test/data/bad.sdf"))
    mol = reader.next()
    tk = top = Tk()

    m = MoleculeDock(top)
    m.pack(fill=BOTH, expand=1)
    m.addMolecule(mol)
    m.addMolecule(mol)
    m.addMolecule(mol)
    m.addMolecule(mol)

    mainloop()

        
コード例 #5
0
m = Smiles.smilin("c1ccccc1CCNc1cccc1CCC")

print m.cansmiles()
removeTerminalAtoms(m)
smarts = m.arbsmarts()
print smarts

pat = Smarts.compile(smarts)
assert pat.match(m)

smiles = []

file = open("F:\\Chemical Libraries\\Libraries to Purchase\\Nat_425.sdf")

reader = MDL.mdlin(file)
mol = reader.next()

print "reading natural products"
i = 0
while mol:
    fp = Fingerprint.generateFingerprint(mol)
    smile = mol.cansmiles()
    mol = removeTerminalAtoms(mol)
    smiles.append(
        (len(mol.atoms), len(mol.bonds), smile, mol.arbsmarts(), i, fp))
    i += 1
    mol = reader.next()

search = smiles
search.sort()
コード例 #6
0
ファイル: test_pruneback.py プロジェクト: MasaruFukuie/Frog2
            
m = Smiles.smilin("c1ccccc1CCNc1cccc1CCC")

print m.cansmiles()
removeTerminalAtoms(m)
smarts = m.arbsmarts()
print smarts

pat = Smarts.compile(smarts)
assert pat.match(m)

smiles = []

file = open("F:\\Chemical Libraries\\Libraries to Purchase\\Nat_425.sdf")

reader = MDL.mdlin(file)
mol = reader.next()

print "reading natural products"
i = 0
while mol:
    fp = Fingerprint.generateFingerprint(mol)
    smile = mol.cansmiles()
    mol = removeTerminalAtoms(mol)
    smiles.append((len(mol.atoms), len(mol.bonds), smile, mol.arbsmarts(), i, fp))
    i += 1
    mol = reader.next()

search = smiles
search.sort()