|
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
Vinay M wrote:
> Can anyone help to know, how to convert from SMARTS to SMILES. You can't. SMARTS is a superset of SMILES, and most SMARTS are not valid SMILES. Perhaps if you explain why you need to do this, we might be able to suggest a solution. Craig ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
> Thanks for your reply, i was using smiles to view the structure, so few are in smarts. I just wanted to convert smiles to smarts and smarts to smiles.
SMILES is a subset of SMARTS, so any SMILES string can be used as a SMARTS. The reverse is not true. I can design many SMARTS, which are not valid SMILES. For example [*] matches any atom. So no, as Craig said, you cannot interconvert them. -Geoff ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
All new Yahoo! Mail - Get a sneak peak at messages with a handy reading pane. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
In reply to this post by vinay
Vinay,
> Thanks for your reply, i was using smiles to view the > structure, so few are in smarts. I just wanted to convert smiles to > smarts and smarts to smiles. Ok, now that I know what you're doing, I can suggest a possible way to do it, but it's not easy. Attached is a little Perl program that might work for 95% of the SMARTS you will encounter. With a bit of work, you might be able to improve it even more. (If you need this in C or C++, it's a lot harder.) You should be able to modify this example to suit your needs. This will parse a SMARTS, and also knows what symbols are valid for SMILES atoms and bonds. Any time it encounters a SMARTS atom that's not a valid SMILES atom, it is replaced it with '*'. C1[C,N]CCCC1 ==> C1*CCCC1 CC-=CC ==> CC-CC It's made more difficult by aromatic structures, for example, c1[n,c]cccc1 becomes c1*cccc1, which in theory is a valid aromatic SMILES, but in practice some interpreters don't consider it aromatic. It doesn't try to deal with bonds, and there are probably SMARTS that it doesn't get right, I just spent a few minutes on it. Craig ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
Instant message from any web browser! Try the new Yahoo! Canada Messenger for the Web BETA ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
Vinay,
> Thanks a lot, could you please send me the C or C++ code, > since it deal with it a lot. I will follow those in perl and try. Thanks > a lot. You're welcome, but I can't do it in C or C++. It would take days to do the same thing. Perl has very powerful string-handling functions, which is the only reason I could write the program so quickly. That's why we use Perl so much. You should try to find a way to incorporate a Perl program into your system. If you rewrite this in C or C++, it will be very difficult. Craig ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ OpenBabel-discuss mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss |
Free forum by Nabble | Edit this page |