I would like to use ForwardSDMolSupplier to read directly from standard in.
This is possible using the normal SDMolSupplier by using something like:
supp = Chem.SDMolSupplier()
data = sys.stdin.read()
## NB This is not the nicest way to do it - especially if the file is
massive (it is held in variable data) - but will do.
suppl.SetData(data, sanitize = True)
data = None # <- do this last step to free up memory in case the file is
large
Can the empty constructor and SetData be added to ForwardSDMolSupplier ?
(possibly this is common behaviour across all Suppliers... and its
righteous place is in the superclass)
Many Thanks,
-
Jean-Paul Ebejer
Early Stage Researcher
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss