ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/mengine.py
(Generate patch)
# Line 1 | Line 1
1   import os
2  
3 < molblock_in = file("drugs.sdf").read()
4 < cmd = os.curdir + os.sep + "mengine -dxi"
3 > cmd = os.curdir + os.sep + "mengine.exe -dxi"
4   # mengine will read multi-molblock sdf files,
5   #  but calling through popen2 with some (large?) files hangs on windows,
6   #  even though the same file runs fine at command line.
7   #  So, split into separate files.
8   for molblock_in in (file("drugs.sdf").read()).split('$$$$\n'):
9 + #for molblock_in in (file("caffeine.sdf").read()).split('$$$$\n'):
10 + #for molblock_in in (file("acaffeine.sdf").read()).split('$$$$\n'):
11   if len(molblock_in) > 0:
12    mengine_in, mengine_out, mengine_err = os.popen3(cmd)
13    mengine_in.write(molblock_in)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines