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

DS 1 7 Scripting

This document provides an overview of DiscoveryScript, the scripting component in Discovery Studio. It discusses the key functionality exposed to scripts including access to underlying data models, file handling capabilities, and data/structure modification and extraction. It describes the Perl scripting environment and covers different contexts for running scripts from the command line, within Discovery Studio Client, or within Pipeline Pilot. Several example uses of DiscoveryScript are provided, and resources for learning more are listed.

Uploaded by

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

DS 1 7 Scripting

This document provides an overview of DiscoveryScript, the scripting component in Discovery Studio. It discusses the key functionality exposed to scripts including access to underlying data models, file handling capabilities, and data/structure modification and extraction. It describes the Perl scripting environment and covers different contexts for running scripts from the command line, within Discovery Studio Client, or within Pipeline Pilot. Several example uses of DiscoveryScript are provided, and resources for learning more are listed.

Uploaded by

Alfred Nobel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Scripting in

Discovery Studio
Daniel Berard
13 February 2007
2
Outline
Part I
Overview of DiscoveryScript
Exposed functionality
Example uses
Contexts for running scripts
Part II
Demo working examples
Resources
How to get started
3
DiscoveryScript - Overview
DiscoveryScript is the scripting component in DS
Access to underlying data models in DS
Special File handlers
Open, Insert files into the data model
Save data models to various file formats
Modify, Extract data
Create a molecule
Modify display
Calculate and extract data
Study a ligand binding site
Visualization (when run within DS Visualizer Pro)
View opened files
Observe script operations
4
DiscoveryScript - Environment
Exposed via Perl scripting language
Implemented as an add-on to Perl
Why Choose Perl?
Perl: well-known, mature scripting language
Perl: full featured scripting language
Loops, tests, branching, subroutines, modules, objects
Can mix DiscoveryScript with other (non-Accelrys or Accelrys) Perl
components
5
Exposed Data Model in DS 1.7
DS Visualizer Pro 1.7 exposes our Molecular Data Model (MDM)
Key objects
For example Atom, Bond, Molecule, Residue, DistanceMonitor
Key commands (including corresponding ViewerPro commands)
For example Rotate, Clean, Zoom
Most properties and key functions
For example XYZ, ElementType, RemoveHydrogens
Constants and enumerated types
For ease-of-use and clarity, such as Mdm::Hydrogen
Arrays and Filters
For example, apply atom filter on a molecule to get all atoms in the
molecule
6
DiscoveryScript - Uses
Scripting is a powerful tool for users
Automate repetitive tasks
Develop custom tools
Combine Accelrys and non-Accelrys tools through Perl
Incorporate DiscoveryScript into pipelines such as Pipeline Pilot
protocols
7
Scripting Contexts
Perl scripts run in different contexts, without modification
1. From command line (stand-alone)
2. From within DS Client
3. From a Pipeline Pilot protocol
Prerequisites (all contexts)
Full DS Visualizer Pro 1.7 installation
Perl, DiscoveryScript and underlying data models
Optional
Pipeline Pilot Professional Client installation
8
Context 1: Stand-alone Scripting
Run from command window (Windows or Linux)
Normal script output displayed in command window
Scripts run without launching DS Client
Full access to all DiscoveryScript capabilities
Full access to Perl tools
such as for debugging scripts
How to run:
Using Perl package with DS Visualizer Pro
Windows: perl.bat <script file>
Linux: sh perl.sh <script file>
cd to installation bin folder (such as C:\Program
Files\Accelrys\Discovery Studio 1.7\bin) or have this in your PATH
9
Context 2: DS Client Scripting
Seamless integration with DS:
Ability to visualize molecule objects
Views automatically updated when executing commands
Manipulating objects directly requires explicit update command
How to run:
File | Open Dialog
Double-click the script file in the File Explorer
Drag-and-drop into the DS Client
10
Context 3: Pipeline Pilot
Seamless integration with Pipeline Pilot Professional Client
Full access to Pipeline Pilot environment
Prepared for direct interactions between the scripts and the Pipeline
Pilot data stream
11
Examples
1. Minimal script - open molecular data file
2. Stand-alone run - export data attributes from file
3. DS Client open view on file, rotate
4. Stand-alone/DS Client - Extract Chi angles
5. DS Client - Render Ligand Cavity isolate, view and beautify
ligand binding site
6. PP Protocol read MSV file, place conformation in PP data stream,
calculate CHARMm energy, save conformations as molecules mol2
file
12
Pipeline Pilot Example
Pipeline Protocol to read msv files (provided by Eric Yan)
Place each conformation as a molecular data record on the PP data
stream
2
nd
component writes each molecular data record to mol2 file as
distinct molecules
Other components can be added such as a minimization stage
13
Resources and Getting Started
Sample Scripts folder in the File Explorer, for example
ExtractAngles.pl extracts valence or torsion angles from a set of
poses
ExtractChiAngles.pl extracts chi angles from amino acids
RenderLigand.pl isolates active binding site and beautifies
Accelrys Community Forum
http://accelrys.org for more scripts
How to get started
Look at and modify existing example scripts
Documentation
Learning Perl lots of good books and courses!

You might also like