Python 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

The following script methylates amides in every selected structure by combining Maestro

commands with direct manipulation of the Workspace structure for each selected entry:
#methylate.py
from schrodinger.maestro import maestro
from schrodinger import structureutil
from schrodinger import project
def methylate():
pt =maestro.project_table_get()
maestro.command("fragment organic Methyl")
for sel_entry in pt:
eid =pt[sel_entry]['s_m_entry_name']
maestro.command("entrywsincludeonly entry", eid )
ct =maestro.workspace_get()
amides =structureutil.evaluate_smarts( ct, "[H]NC(=O)" )
for amide in amides:
maestro.command("attach %d" %amide[0] )
You can use practically any combination of Maestro commands and direct manipulations in the
Workspace structure to achieve the results you want. We have also provided a similar function,
project.getPropertyNames() that returns the property names.

You might also like