New to Reactor -- Need Syntax help!

User fd4af72735

09-10-2008 15:06:31

Hi all,





I just started working with reactor, and I'm a little lost as to how to code for the reactivity/selectivity/exclude rules. Is there a document somewhere which explains the syntax and context for these fields? I did a quick search on the forums and in the help file, but haven't been able to turn up anything yet. Any help would be appreciated. Thanks!

ChemAxon d76e6e95eb

09-10-2008 15:36:36

Reactor can be used without rules in many cases with a well defined reaction scheme and preselected reactants. However, rules enables you to build generic reactions that process input molecules selectively. Rules allows you to use available chemicals as input, the activation/deactivation effects, regioselectivity, and sensitive funcional groups are determined automatically.





The three rules (reactivity, selectivity and exclude) can be formulated in the Chemical Terms language using and combining more than a hundred functions available through a plugin technology.





You can find some posters and publications about Reactor at the publication library.





You can examine the rules in the demo reaction set provided with Reactor located at the examples/reactor/library/reactions.mrv file in the jchem directory.

User fd4af72735

09-10-2008 15:40:45

Thanks! I'll play around with it and see what I can do.





There's a few hurdles to overcome-- the first is merely distinguishing a secondary amine from a secondary amide for an amidation. I saw an example somewhere, so now I just need to figure out how to replicate it.





Thanks again.

ChemAxon d76e6e95eb

09-10-2008 15:58:59

I am sure, that you will get the idea if you read the last few topics of the Reactor FAQ. ;)





My preferred solution is using SMARTS, though match function can sometimes result a clearer reaction scheme.

User fd4af72735

09-10-2008 19:27:29

Ok, so I gave myself a quick run-through of SMARTS, and I figured out of some of the syntax, then tried a match statement for my reaction. This is what I ended up with.





!match(ratom(1), "[#6][N:1]C=O", 1)





I tried to run, and got this error:





chemaxon.reaction.ReactionException: Error while evaluating expression:


(!match(ratom(1), "[#6][N:1]C=O", 1)) && !(NC=O)


Unrecognized symbol: "O"








However, looking back at the example you gave, it looks like I have the same thing... what did I do wrong?





Thanks.

ChemAxon d76e6e95eb

09-10-2008 20:36:59

Very good, SMARTS will be extremely useful in reaction design.





If you examine the error message it shows two parts separated by an and operator marked with "&&". The first part is the match statement, it seems correct if the nitrogen atom of in the reaction scheme is mapped with number 1. However, the error message shows an invalid trailing part "&& !(NC=O)", probably an early attempt that you have left in the rule editor unintentionally.

User fd4af72735

09-10-2008 20:45:15

That was exactly it! Before I started any of the actual SMARTS manipulations, I tried that in the "Exclude" field. I forgot to delete it, and I guess it simply concatenated the conditions.





Upon deleting that, it seems to work fine. Thanks!