ds 1 7 scripting
TRANSCRIPT
-
8/11/2019 DS 1 7 Scripting
1/13
Scripting inDiscovery Studio
Daniel Berard
13 February 2007
-
8/11/2019 DS 1 7 Scripting
2/13
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
-
8/11/2019 DS 1 7 Scripting
3/13
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
-
8/11/2019 DS 1 7 Scripting
4/13
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) Perlcomponents
-
8/11/2019 DS 1 7 Scripting
5/13
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
-
8/11/2019 DS 1 7 Scripting
6/13
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
-
8/11/2019 DS 1 7 Scripting
7/13
-
8/11/2019 DS 1 7 Scripting
8/13
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: p er l . b at Linux: sh p er l . sh cd to installation bi n folder (such as C:\Program
Files\Accelrys\Discovery Studio 1.7\bin) or have this in your PATH
-
8/11/2019 DS 1 7 Scripting
9/13
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
-
8/11/2019 DS 1 7 Scripting
10/13
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 PipelinePilot data stream
-
8/11/2019 DS 1 7 Scripting
11/13
11
Examples
1. Minimal script - open molecular data file2. Stand-alone run - export data attributes from file3. DS Client open view on file, rotate4. Stand-alone/DS Client - Extract Chi angles5. DS Client - Render Ligand Cavity isolate, view and beautify
ligand binding site6. PP Protocol read MSV file, place conformation in PP data stream,
calculate CHARMm energy, save conformations as molecules mol2file
-
8/11/2019 DS 1 7 Scripting
12/13
-
8/11/2019 DS 1 7 Scripting
13/13
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!