PURPOSE: The idea of the attached script is to print out the values of the mapped field into a text file.
INSTALLATION: Save the attached zip file to a local directory or location accessible from the Files Explorer and unzip it. Open Materials Studio new project and import the entire folder into the visualizer. Please, note that the text file is not required to run the script. It is generated as a result when script runs to completion.
USAGE: This script runs only on the server. This is how it is implemented:
First it requires a DMol3 Geometry Optimization run for C2H4 molecule (as an example) calculating the Electrostatic (ES) potential and Electron density fields. Then the isosurface of the ES is built and
the electron density field is mapped onto it.
This is the idea of the script:
1. Get the isovalue
2. Loop through the ES field and find the field values corresponding to the isovalue. Here it is important to get the Cartesian coordinates corresponding to the field values
3. The above coordinates can be used now to calculate the density field values at the obtained Cartesian coordinates.
DISCLAIMER: This custom script is compatible with Materials Studio 5.5. It is provided "as is" and is NOT supported by Accelrys nor is it warranted for any purpose whatsoever. The user assumes responsibility for any malfunctions or bugs.
REQUIREMENTS: The script requires a DMol3 Geometry Optimization run and obtained ES potential isosurface with mapped electron density on it.
EXPECTED RESULTS:The script generates a text file with the mapped density field values. If debug=1 then the script creates a hydrogen atom whenever it writes out a value. This allows to assess whether the script writes the coordinates correctly.
