Closed yanfeiguan closed 6 years ago
I got the 35,36=Me,Ph style substituent request working. It now behaves just like the original AaronTools method.
However, to get the named style (eg: Me=Ph,OH), I had to change the screen_subs function in Catalysis.pm. Basically, it was using grep to only add numbered targets (and thus skipping over named targets). Was there a reason that screen_subs was limited to only numbered target atoms for substitution? It's just calling the substitute function, which can take named targets...
If so, i'll need to come up with a more robust work-around.
Actually, it looks like this might have been due to named substitutions not working on the substrate. I've added an if/else block in the screen_subs function so named substitutions are allowed for ligands only.
I think the cat_screen command line script can be improved.
The current cat_screen script cannot take into number but not name of substituent, for example: If you do cat_screen ts1.xyz -l Ph=Me It will rise an error for the input Ph substitute.
Second, the current cat_screen script cannot screen multiple subs meanwhile. That is in the original screen_subs perl function, if you do $cata->screen_subs('ligand', 35,56=>Me, Ph), it will just give you two structures (35,56=Me and 35,56=Ph) not four structures. I think this should be useful and we should keep that in the cat_screen script.