0% found this document useful (0 votes)
25 views6 pages

1 - Getting Started

This tutorial provides a step-by-step guide for installing and setting up scripts in Materials Studio, including downloading the necessary files and configuring the user menu. It also outlines potential issues that may arise during installation and how to resolve them, as well as instructions for defining script job controls for server execution. Users are advised to follow the directory structure and naming conventions to ensure proper functionality of the scripts.

Uploaded by

qwwpeu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views6 pages

1 - Getting Started

This tutorial provides a step-by-step guide for installing and setting up scripts in Materials Studio, including downloading the necessary files and configuring the user menu. It also outlines potential issues that may arise during installation and how to resolve them, as well as instructions for defining script job controls for server execution. Users are advised to follow the directory structure and naming conventions to ensure proper functionality of the scripts.

Uploaded by

qwwpeu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1 - Getting Started P.M.J.

Szell

Title 1 – Getting Started


Date July 20th 2021
Author Patrick M.J. Szell

Scope. In this tutorial, we will get started by installing our scripts in Materials Studio and
defining the settings to run the scripts on the server. We will also introduce several features
in the scripting interface, and cover some potential problems. In order to streamline the
installation process for all users, please download the ZIP file that contains all the scripts
from the Box. You will only have to install each script once.
Step 1 – Downloading & extracting the scripts.
1) Download the ZIP file (MaterialsStudioScripts.zip) containing all the scripts, and extract it
to your “C:\” directory. Preserve the folder hierarchy to ensure proper functioning of the
scripts.

The result should be a series of folders containing the scripts in the directory:
“C:\Materials Studio Scripts”
The directory and folder names is critical for the scripts to work.
Step 2 - Installing a script. Once you have your scripts placed in the directory, follow these
steps:
1) Open Materials Studio, click on “Tools -> Scripting -> Library”
1 - Getting Started P.M.J. Szell

2) In the dialogue that has opened, on the “Library” tab, under the “Location” section, click
on “Add”. Type in the name “MyScripts”, and then define the path to “C:\Materials Studio
Scripts” by clicking “<click to add path>” and typing it in. Once that’s done, the “+” should
appear next to the folder, and clicking it will reveal folders with the scripts.

3) We will now add the script to the user menu so that it’s easily accessible. In the same
dialogue, click on the “User menu” tab at the top of this window and the following dialogue
will appear. Under “Archive”, click “Import..” and select the “_User Menu.xml” file for the
script you wish to import. If you respected the directory names, everything should work
automatically. Repeat for each script.
Do not use the “Insert Command” and manually set the script, as you will not have any of the
defined arguments and the script will fail to work.
1 - Getting Started P.M.J. Szell

The scripts should now be ready and available for you to use. Note that some scripts require
you to select a certain filetype in order for it to become available. For instance, selecting an
XSD Atomistic file will make most of the Modelling scripts available (blue triangle) and
some will remain unavailable (grey triangle).

It is worth defining some of the parameters here.


Title: Name of the script on the user menu
Description: Description of the script appearing at the bottom left of the Materials Studio
window upon hovering your mouse over the script.
Script: The Perl (.pl) script and its directory. Click View to look over the script.
Run on: Defines whether the script will be ran on the server (i.e. for CASTEP calculations)
or on the client side (locally, i.e. the modelling scripts).
1 - Getting Started P.M.J. Szell

Requires: Defines what file the script will be locked to (i.e. XSD 3D atomistic document)
Arguments: Defines the arguments for the script, allow users to change certain key
parameters on the fly.
Uses: Defines which document the script will run on (i.e. the active document).

Potential problem & solution.


If your scripts are not functioning, there may be a problem with the installation. The scripts
will appear grey in the user menu no matter what you select. In this case, return to the scripts
library menu (Tools -> Scripting -> Library) and select the script that isn’t functioning. If the
script name is highlighted in red, that means Materials Studio couldn’t find it in the
“MyScripts” folder and the “C:\Materials Studio Scripts” directory. This could simply be
because you didn’t name “MyScripts” properly.
If this doesn’t work, you will have to browse for the script manually. Click the “…” button
next to the script name written in red, and select the correct script in its directory.

Step 3 – Defining the Script Job Controls


In order for some of the scripts to run on the server, you will have to define the script job
controls. These settings must be defined for each project.
1) Click on “User > Script Job…” and the Script Job Control window will open.
1 - Getting Started P.M.J. Szell

2) Enter in the following information:


Gateway location: materialsstudio.scp.astrazeneca.net
Queue: core
Run in parallel on: XX cores (recommended 16 to start)**
** If you receive an “Out of Memory” error, you may want to increase the number of cores.
For large jobs, you may have to use all 128 cores.
1 - Getting Started P.M.J. Szell

More information.
Some scripts have arguments, which allows the user to conveniently define a few parameters.
A list of arguments for each script can be found in their respective tutorials. Default
recommended values have been defined for your convenience. However, these default values
can be modified to suit the needs of the user and to ensure the scripts remain future-proof.

You might also like