0% found this document useful (0 votes)
29 views

Python 1

This document describes a Python script that methylates amides in selected structures by combining Maestro commands with direct manipulation of the workspace structure. The script loads a methyl fragment, iterates through the project table to select each entry, includes only that entry in the workspace, finds any amide groups using a SMARTS pattern, and attaches the methyl group to each amide found. It concludes by noting that most results can be achieved through combinations of Maestro commands and direct workspace manipulation.

Uploaded by

tarun06
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Python 1

This document describes a Python script that methylates amides in selected structures by combining Maestro commands with direct manipulation of the workspace structure. The script loads a methyl fragment, iterates through the project table to select each entry, includes only that entry in the workspace, finds any amide groups using a SMARTS pattern, and attaches the methyl group to each amide found. It concludes by noting that most results can be achieved through combinations of Maestro commands and direct workspace manipulation.

Uploaded by

tarun06
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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