XtalOpt Tutorial


PDF format available here


Contents




Launch XtalOpt

Open avogadro, go to the "Extensions" menu and select "XtalOpt".


Enter composition and restraints

struct-lim.png

The interface opens to the "Structure Limits" tab, shown above. We will use a 6 formula unit supercell of titanium dioxide for this tutorial, so enter "Ti6 O12" for the cell composition. We will assume that we know nothing about the system and use very loose restraints (however, note that a search is much more effective if chemically reasonable restraints are used). Set all cell length minima to 1 angstrom and maxima to 20 angstroms. Constrain the angles to be between 60 and 120 degrees, and the volume from between 1 and 500 cubic angstroms. Specify a minimum interatomic distance of 0.5 angstroms. (Note that due to the angle adjustment described in CPC, 2011, 182, 372-387, 60-120 degrees is the largest range of cell angles that XtalOpt will generate.)


Optimizer setup

XtalOpt currently supports the VASP, GULP, PWscf, CASTEP, and SIESTA codes for performing geometry optimizations. Each is detailed in its own section below.



VASP

opt-set-vasp.png

On the next tab, load the optimization scheme by clicking the "Load Opt Scheme" button and selecting the "samples/vasp-xtalopt.scheme" file that is distributed with the source code. If you do not have a copy of the source code, the scheme file can be obtained by clicking here.

For more details on optimization schemes, see optschemes.

After loading the optimization scheme, XtalOpt will prompt for the POTCAR files to use. Select files appropriate for the prompted atom. XtalOpt will construct the POTCAR files on the local computer, and then copy them over to the cluster when the calculation is submitted. It is necessary to have the VASP POTCAR files for each atomic species located somewhere on the local computer. See the VASP manual for information on obtaining the POTCAR files.

Take a moment to look through each file for each optimization step. Notice that the INCAR template includes two user-specified values, %user2% and %user3% for the external pressure and the energy cutoff, respectively. By entering appropriate values in the "user2:" and "user3:" fields on the left, it is easy to update these values for all optimization steps.

Notice the other %keyword% values in the job.pbs templates. These are used to enter information that is specific to a search or structure when the actual input files are written prior to job submission. Click the "Help" button for a full listing of the available keywords.

XtalOpt expects VASP to use the default filenames, mainly POSCAR, CONTCAR, and OUTCAR.

Skip to next section.



GULP

opt-set-gulp.png

On the next tab we choose GULP for the local optimizer and enter a template for GULP to use. Select "GULP" as the "Optimizer" and "xtal.gin" as "Template". Next, fill out the text field on the right with the following template:

opti conj conp
switch_minimiser bfgs gnorm 0.5

cell
  %a% %b% %c% %alphaDeg% %betaDeg% %gammaDeg%

frac
  %coordsFrac%

species
  Ti 2.196
  O -1.098

buck
  Ti Ti 31120.1 0.1540 5.25  15
  O  O  11782.7 0.2340 30.22 15
  Ti O  16957.5 0.1940 12.59 15

lennard 12 6
  Ti Ti 1 0 15
  O  O  1 0 15
  Ti O  1 0 15

Alternatively, one can load the scheme file distributed with the source code under samples/gulp-TiO-xtalopt.scheme. If the source code is not available, the scheme file can be obtained by clicking here.

For more details on optimization schemes, see optschemes.

Note the "%" surrounding various keywords. These will be replaced by the structure-specific data when the optimizer is invoked for each structure. Click "Help" to view all of the keywords available. The number of optimization steps can be modified with the "Add/Resume" buttons. The "user" fields in the lower left corner allow users to specify their own keyword/value pairs, which is useful for making changes to multiple optimization steps at once. We will only be using one optimization step in this tutorial.

XtalOpt expects GULP to use the following filenames:

gulp < xtal.gin > xtal.got

Skip to next section.



PWscf

opt-set-pwscf.png

On the next tab, load the optimization scheme that is distributed with the source code under the samples/ directory. The scheme that we want is named "pwscf-xtalopt.scheme". If the source code is not available, the scheme file can be obtained by clicking the "Original Format" link at the bottom of the page here.

For more details on optimization schemes, see optschemes.

Each PWscf input file will need to be edited to specify:

  1. The pseudo_dir containing the pseudopotential files on the remote cluster, and
  2. The pseudopotentials for each atom (under ATOMIC_SPECIES)

Take a moment to look through each file for each optimization step.

Notice the %keyword% values in the job.pbs templates. These are used to enter information that is specific to a search or structure when the actual input files are written prior to job submission. Click the "Help" button for a full listing of the available keywords.

Be aware that every PWscf/CASTEP installation is different, and it is almost certain that the job.pbs file included with this scheme will not work on any cluster other than the Zurek group's "parity" cluster at SUNY Buffalo's Center for Computational Resources. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance for information about MPI, executable locations, etc. Perhaps the easiest method to find the correct PBS script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

XtalOpt expects PWscf to use the following filenames:

pw.x < xtal.in > xtal.out


Skip to next section.



CASTEP

opt-set-castep.png

On the next tab, load the optimization scheme that is distributed with the source code under the samples/ directory. The scheme that we want is named "castep-xtalopt.scheme". If the source code is not available, the scheme file can be obtained by clicking the "Original Format" link at the bottom of the page here.

For more details on optimization schemes, see optschemes.

It is important to note that CASTEP input files require the "%" character to define blocks. The percent character is special in the XtalOpt input template parser to define keywords (see below). To insert a literal "%" into the input, use percent%.

E.g. Specification of the fractional coordinate block in the .cell template should look like:

%percent%BLOCK POSITIONS_FRAC
%coordsFrac%
%percent%ENDBLOCK POSITIONS_FRAC

Take a moment to look through each file for each optimization step.

Notice the %keyword% values in the job.pbs templates. These are used to enter information that is specific to a search or structure when the actual input files are written prior to job submission. Click the "Help" button for a full listing of the available keywords.

Be aware that every PWscf/CASTEP installation is different, and it is almost certain that the job.pbs file included with this scheme will not work on any cluster other than the Zurek group's "parity" cluster at SUNY Buffalo's Center for Computational Resources. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance for information about MPI, executable locations, etc. Perhaps the easiest method to find the correct PBS script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

XtalOpt expects CASTEP to use the following filenames:

# XtalOpt will write xtal.cell, xtal.param
castep xtal
# CASTEP will create xtal.castep

Skip to next section.



SIESTA

On the next tab we choose SIESTA for the local optimizer and enter a template for SIESTA to use. Select "SIESTA" as the "Optimizer" and "xtal.fdf" as "Template".

Next, fill out the text field on the right with the following template:

SystemName %description%
SystemLabel %description%-%gen%x%id%

NumberOfAtoms %numAtoms%
NumberOfSpecies %numSpecies%

%block Chemical_Species_Label
%chemicalSpeciesLabel%
%endblock Chemical_Species_Label

PAO.BasisSize SZ

# Lattice, coordinates, k-sampling
AtomicCoordinatesFormat Fractional
AtomicCoorFormatOut Ang

%block% AtomicCoordinatesAndAtomicSpecies
%atomicCoordsAndAtomicSpecies%
%endblock% AtomicCoordinatesAndAtomicSpecies

LatticeConstant 4.10 Ang
%block% LatticeVectors
%cellMatrixAngstrom%
%endblock% LatticeVectors

kgrid_cutoff 7. Ang

# DFT, Grid, SCF
XC.functional LDA # Exchange-correlation functional type
XC.authors CA # Particular parametrization of xc func
SpinPolarized .false. # Spin unpolarized calculation
MeshCutoff 200. Ry # Equivalent planewave cutoff for the grid
MaxSCFIterations 100 # Maximum number of SCF iterations per step
DM.MixingWeight 0.3 # New DM amount for next SCF cycle
DM.Tolerance 1.d-4 # Tolerance in maximum difference

# between input and output DM
DM.NumberPulay 3 # Number of SCF steps between pulay mixing

# Eigenvalue problem: order-N or diagonalization
SolutionMethod diagon # OrderN or Diagon
ElectronicTemperature 5 K # Temp. for Fermi smearing

# Molecular dynamics and relaxations
MD.TypeOfRun cg # Type of dynamics:

Or load the optimization scheme by clicking the "Load Opt Scheme" button and selecting the "samples/siesta-xtalopt.scheme" file that is distributed with the source code.

For more details on optimization schemes, see optschemes.

After loading the optimization scheme, XtalOpt will prompt for the xtal.psf files to use. Select files appropriate for the prompted atom. XtalOpt will copy the individual files over to each structure directory when the calculation is submitted. See the SIESTA manual for information on obtaining the .psf files.

Notice the other %keyword% values in the xtal.fdf templates. These are used to enter information that is specific to a search or structure when the actual input files are written prior to job submission. Click the "Help" button for a full listing of the available keywords.

Note that in the current implementation XtalOpt uses the Total Final Energy printed in the output to determine the fitness of a structure. If the user would like to use a different thermodynamic quantity for the fitness, please contact the XtalOpt developers.

XtalOpt expects SIESTA to use the following filenames:

siesta < xtal.fdf > xtal.out

Queue setup

XtalOpt currently supports using the PBS, SGE, SLURM, LSF, and LoadLeveler queuing systems on remote SSH-accessible clusters, as well as an internal local queue that manages calculations on the user's workstation. Each queueing interface is detailed in its own section below.



Using a remote PBS cluster

opt-set-pbs.png

Select "PBS" from the list of Queues, and then click the "Configure..." button. A new window will prompt for:

A new template, "job.pbs" is added to the list of available templates. This is the job submission script for PBS. This script should roughly follow this design:

#/bin/bash
#PBS -l nodes=1:ppn=8
#PBS -o ../%gen%x%id%-%optstep%.out
#PBS -e ../%gen%x%id%-%optstep%.err
#PBS -N %description%-%gen%x%id%-%optstep%
###Include this for XtalOpt scripts!###
export PBS_O_WORKDIR=%rempath%
# Change to structure's working directory, copy input files to node's scratch dirs:
for node in `cat $PBS_NODEFILE | sort | uniq`; do
rsh $node "cp $PBS_O_WORKDIR/* $PBSTMPDIR/;";
done
# Move to the scratch directory
cd $PBSTMPDIR
echo "running in directory $PBSTMPDIR"
# Set any environment variables needed for the optimizer/MPI here:
# Run optimizer, be sure to use the filenames that XtalOpt expects.
# See the template menu in XtalOpt and the example templates in the
# samples/ directory of the XtalOpt sources.
# Don't forget to clean up after MPI if needed!
// Print files from each node
for node in `cat $PBS_NODEFILE | sort | uniq`; do
echo "$node:"
rsh $node "ls -l $PBSTMPDIR"
done
# Copy back results from master node's scratch directory
cp $PBSTMPDIR/* $PBS_O_WORKDIR/

For more details on optimization schemes, see optschemes.

Be aware that every installation is different, and it is almost certain that the job.pbs file included with this scheme will not work on any cluster other than the Zurek group's "parity" cluster at SUNY Buffalo's Center for Computational Resources. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance or information about MPI, executable locations, etc. Perhaps the easiest method to find the correct PBS script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

A handy trick for monitoring jobs outside of XtalOpt is to include the following line in job.pbs:

#PBS -N %description%-%gen%x%id%-%optstep%

This will name each job, for example, xtalSearch-3x4-2, where xtalSearch is a user-specified description of the search, and 3x4-2 means that it is the fourth structure in the third generation running its second optimization step.


Skip to next section.



Using a remote SGE cluster

opt-set-sge.png

Select "SGE" from the list of Queues, and then click the "Configure..." button. A new window will prompt for:

A new template, "job.sge" is added to the list of available templates. This is the job submission script for SGE. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance or information about MPI, executable locations, etc. Perhaps the easiest method to find the correct SGE script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

For more details on optimization schemes, see optschemes.

Skip to next section.



Using a remote SLURM cluster

opt-set-slurm.png

Select "SLURM" from the list of Queues, and then click the "Configure..." button. A new window will prompt for:

A new template, "job.slurm" is added to the list of available templates. This is the job submission script for SLURM. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance or information about MPI, executable locations, etc. Perhaps the easiest method to find the correct SLURM script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

For more details on optimization schemes, see optschemes.

Skip to next section.



Using a remote LSF cluster

opt-set-lsf.png

Select "LSF" from the list of Queues, and then click the "Configure..." button. A new window will prompt for:

A new template, "job.lsf" is added to the list of available templates. This is the job submission script for LSF. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance or information about MPI, executable locations, etc. Perhaps the easiest method to find the correct LSF script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

For more details on optimization schemes, see optschemes.

Skip to next section.



Using a remote LoadLeveler cluster

opt-set-ll.png

Select "LoadLeveler" from the list of Queues, and then click the "Configure..." button. A new window will prompt for:

A new template, "job.ll" is added to the list of available templates. This is the job submission script for LoadLeveler. It may take some experimentation to get jobs to submit successfully, and you may need to contact the system administrators of the cluster for assistance or information about MPI, executable locations, etc. Perhaps the easiest method to find the correct LoadLeveler script is to run some trial submissions by hand, and then replace the structure/search specific information with the appropriate keywords once a working script has been generated.

For more details on optimization schemes, see optschemes.

Skip to next section.



Running optimizations locally

opt-set-local.png

Select "Local" from the list of Queues, and then click the configure button. A new window will prompt for:

If the optimizer's executable (vasp, gulp, pw.x, castep, etc) is not in your system path, you will need to specify the location of the executable by clicking the "Configure..." button next to the optimizer selection menu.

For more details on optimization schemes, see optschemes.


What is written to the local directory?

A directory for each structure is created at

[Local working directory]/<gen#>x<id#>

that will contain input, output, and data files specific to each structure. Two additional files are also written to the local filesystem:

[Local working directory]/xtalopt.state

which contains save/resume information to continue a session that has been stopped, and

[Local working directory]/results.txt

which stores a list of all structures sorted by increasing enthalpy. The latter file is handy for offline analysis, since there is no need to open XtalOpt to find the most stable structures of a previous search.



Search Settings

search-set.png

In the "Search Settings" tab, most of the default settings should suffice (See CPC, 2011, 182, 372-387). We arbitrarily set the initial structures to 20 and the continuous structures to 5, although these may need to be adjusted based on available resources. We will not specify initial seeds, but the option to do so exists on this screen.

It is not neccessary to limit the number of running jobs unless running locally, as the PBS queue on the cluster will manage job control for us. If running locally, set the job limit no higher than [number of available processor cores] - 1 (e.g. for a quadcore processor, allow three jobs to run simultaneously). This allows one core to remain free for the system to run.

There is now a termination criteria called "Total Number of Structures" that will end the run once a certain number of structures have been produced by XtalOpt.



"Begin"

prog-start.png
The ``Progress'' tab immediately after starting a search

XtalOpt has everything it needs to start its search at this point; click the "Begin" button in the lower right corner of the application to tell it to start the search algorithm. A progress bar appears as the random first generation is created. Switch to the "Progress" tab and 20 entries will appear, all with a status of "Waiting for Optimization". Click "Refresh" on this tab to begin the local optimizations. From here, XtalOpt will continue to run without user input, starting new optimizations and generating new structures until it is stopped by the user.



Monitor progress

prog-mon.png
The ``Progress'' tab mid-run

As XtalOpt performs the search, the progress table continuously updates, providing information about each structure. We see individuals in various stages of completion: most are optimized (in blue), structure 2x2 has been automatically marked as a duplicate (dark green) of structure 1x2 and removed from the breeding pool, structure 3x4 is currently undergoing a local optimization (light green), while structure 2x10 is waiting to be optimized (light blue).

Other useful information is displayed about each structure, such as the time spent in optimization, the optimized enthalpy, the cell volume, spacegroup, and each structure's ancestory (i.e. parent(s) and parameters for the genetic operator that generated it). A status bar on the bottom of the window shows the number of structures that are optimized, running, and failing at any given time. This information is visible regardless of which tab is currently being viewed.

An additional feature of the progress table is the ability to immediately visualize any of the individuals in the Avogadro main window – simply clicking on a row in this table will display the three-dimensional structure in Avogadro, where it can be visualized, modified, or exported. If the user would like to add a bit of "intelligent design" to the evolutionary process, a structure can be modified and then resubmitted using a context (right-click) menu from the progress table. The context menu provides tools to (un)kill a structure, resubmit for local optimization at an arbitrary optimization step, or replace a problematic structure with a new, random individual.

Three additional buttons found near the "Refresh All" button in this tab are also available. The "Print Results File" button generates a run-results.txt file that lists all of the information about each structure in order of generation and structure number (As compared to the results.txt file which ranks the structures). The "Remove Extra Files" button is used for VASP runs. It removes any extraneous files in each local subdirectory in order to reduce disk usage. Files kept are structure.state, POTCAR, CONTCAR, OSZICAR, job.slurm and OUTCAR. Finally, the "Rank All" button ranks all currently optimized structures and exports them to a subdirectory (Ranked) in two forms (depending on the optimizer): POSCAR/.got and .cif. Each can be found in separate directories. (Only works for GULP and VASP runs currently).

View trends

trend-view.png
The ``Plot'' tab mid-run displaying enthalpy vs. volume. Each structure is labeled with its Hermann Mauguin spacegroup symbol.

Another visualization and analysis tool available during the search is the interactive plot. The plot is capable of investigating trends in the search by plotting a point for each individual using structure number, generation number, enthalpy, energy, $PV$ enthalpy term, lattice parameters, or cell volume on either axis. This powerful feature allows the user to visualize complex relationships present in the generated structures. E.g., a plot of enthalpy vs. structure number provides an overview of the search's progress. Or, recalling that H = U + PV, plotting enthalpy vs. PV enthalpy term or energy lends insight into whether the enthalpy (H) is dominated by atomic interactions (U) or cell parameters (PV). Further information is available by labeling the points with the individual's spacegroup number, Hermann Mauguin spacegroup symbol, enthalpy, energy, PV term, volume, generation, or index number.

A particularly useful plot is that of enthalpy vs. cell volume, as shown above. From this view, we see a general trend that enthalpy increases with volume (the effect is much more pronounced for systems at higher pressures), and also that below a certain volume enthalpy rises sharply. From this data set, we see that there is a cluster of very low enthalpy structures with cell volumes around 180 cubic angstroms. Armed with this data, we can update the starting volume on the Structure Limits tab mid-run to reflect this new piece of information that the search has provided us. Many of the other parameters governing structure generation and algorithm specifics can be similarly modified during a search without the need to restart the algorithm.

The plot is also interactive; zooming and panning are possible using simple mouse controls. Clicking on a structure's point on the plot will load it in the main Avogadro window, allow all the same functionality as described above in Monitor progress.



What are optimimization schemes, and why use them?



In a nutshell..

An optimization scheme is a series of optimization steps ("optsteps") that are to be performed in sequence on a structure. Each optimization step consists of a set of input file templates for the queuing system and optimizer to be used, and the structure is updated after each completes. So if an optimization scheme contains three optimization steps, a stucture's lifecycle is:

  1. Generation of initial structure
  2. Perform optstep 1 on initial structure
  3. Update structure from the results of optstep 1
  4. Perform optstep 2 on current structure (result of optstep 1)
  5. Update structure from the results of optstep 2
  6. Perform optstep 3 on current structure (result of optstep 2)
  7. Update structure from the results of optstep 3
  8. Current structure (result of optstep 3) is either accepted into the breeding pool or discarded, depending on its enthalpy relative to the other optimized structures.


More details

The efficiency of searching a potential energy surface for a global minimum can be significantly improved by moving each candidate structure to the nearest local minimum, i.e. performing a geometry optimization. The differences between searching with and without carrying out these local optimizations are explored in detail in Woodley SM, Catlow CRA. Comp. Mat. Sci. 2009;45(1):84-95 (Available at: http://linkinghub.elsevier.com/retrieve/pii/S0927025608003030 ).

Why not just perform a single geometry optimization on each structure? Stochastic search techniques, such as XtalOpt, will often need to perform geometry optimizations on structures that are far from a stationary point on the potential energy surface. For example, the randomly generated structures in the first generation of an evolutionary search are often highly disordered with unrealistic atomic separations. If these structures were to be optimized in a single step with accurately small convergence criteria, it would be quite expensive. Also, it is more than likely that most of the optimizations would not finish successfully before reaching the maximum number of geometry steps allowed by the optimizer or specified in the input. A second issue is that complex structures (periodic crystals, for example) often have so many degrees of freedom that convergence in a single step is difficult from a poor starting point (consider the effect on atomic coordinates when a unit cell's translation vector is modified).

The first problem (effectively optimizing to small convergence) can be solved by implementing an optimization scheme that optimizes to successively smaller convergence cutoffs.

The second problem can be addressed by reducing the degrees of freedom in the early optsteps and only optimizing everything once each component has individually converged to a reasonable parameterization. See Suggestions for optimization schemes for examples.



Optimization scheme user interface


optschemes-numberededitor.png

We will use the above screenshot as we describe the process of creating, saving, and loading optimization schemes. The numbers indicate:

  1. List of optimization steps
  2. Button to add new optimization step
  3. Button to remove current optimization step
  4. Template selection menu
  5. Template editor
  6. Button to save current optimization scheme to file
  7. Button to load optimization scheme from file

Optimization step list

This list shows the currently available optimization steps in the order that they will be performed. The optstep that is currently selected for editing is highlighted, and the editable optstep can be selected by clicking the appropriate entry.


Add new optimization step

Clicking this button will append a new optimization step to the optstep list. The new optstep's templates will be copies of the currently selected optstep's templates.


Remove current optimization step

Click this button to delete the currently selected optimization step.


Select template

This menu contains the filenames of the templates that are required by the currently selected queuing system (e.g. PBS, SGE, local...) and optimizer. The currently selected template is displayed in the template editor, and selecting a different template will update the editor.


Template editor

This text editor is used to view and edit the currently selected template for the current optstep.


Save scheme

This button will prompt for a location to save a .scheme file containing the current optimization step.


Resume scheme

This button will prompt for an existing .scheme file to load.



How to build an optimization scheme?

Creating a working scheme from scratch may take some time. We recommend checking the samples/ directory of the source code to obtain sample scheme for each optimizer (see How to load an optimization scheme?) and verifying that they are appropriate for the system under consideration before starting a search.

If there is not an appropriate sample, the following prescription may be used to generate your own:

  1. Generate a random structure of the system under consideration. This may be done by hand, or by running a search just long enough to create the first random generation and saving one of the structures.
  2. Create a starting optstep with the desired convergence criteria
  3. Manually submit the optimization
  4. If the optimization fails:
    1. First determine why – if the maximum iterations were exceeded or the optimization was aborted due to a badly performing minimizer, try one of the ideas below. Other optimization problems are beyond the scope of this document.
    2. Reduce the convergence criteria of the current trial optstep
    3. Remove degrees of freedom, e.g. by fixing cell parameters, atomic positions, etc
    4. Reduce the accuracy of the calculation in other ways (use a courser integration grid, etc).
    5. Change the minimizer (e.g. tell the optimizer to use conjugate gradients rather than BFGS, etc)
  5. Once the optimization succeeds, create another set of input files with the desired convergence criteria for all degrees of freedom.
  6. Manually submit the new optimization step. If it fails, try the ideas above until it converges.
  7. Once the structure has converged to the desired level of accuracy, try to optimize another randomly generated structure using the optsteps that succeeded previously. Refine them if needed.
  8. Once you have successfully optimized enough random structures that you are confident in your method, gather all of the inputs used and write your scheme from them.

The scheme may be written by copying each input file into the template editor (with the appropriate optstep and template selected, of course) and replacing the structure-specific information with the appropriate keywords. Click the "Help" button for the complete list of keywords.

We have found that the optimization schemes are surprisingly transferable within an optimizer, so once you have a working optimization scheme for a given optimization code only minor tweaks (usually to the energy cutoffs, etc ) are necessary to use it on a different chemical system.



How to save an optimization scheme for later?

Once you have written your optimization scheme, you will want to save it for fast retrieval later (otherwise you will need to copy/paste and edit all of the templates again!). To save, simply click the "Save Opt Scheme" button and enter an appropriate filename with an extension of .scheme.



How to load an optimization scheme?

Loading an optimization is quite simple – just click the "Load Opt Scheme" button and select the .scheme file you wish to load. This will also update the current queuing system and optimizer to those specified by the scheme.



What is saved?

The optimization scheme files contain more than just the templates for each optstep. They also store queue and optimizer specific settings. This is useful for storing configuration options for different clusters along with the scheme. Note that although XtalOpt will prompt for an SSH password if needed, it is NOT stored in the scheme file.



Suggestions for optimization schemes



Crystals (XtalOpt)

The following list describes the optimization steps used in the samples/vasp-xtalopt.scheme file distributed with the XtalOpt source code:

  1. Fix unit cell, only optimize atomic coordinates. A very loose convergence criterion is used, and the number of KPOINTs is kept small.
  2. The cell volume is fixed, but atomic positions and cell parameters are allowed to vary. The convergence criteria is the same as before, as is the KPOINT grid.
  3. All degrees of freedom are considered using the same convergence criteria as before, but with a finer KPOINT grid.
  4. Same as before, but with a stricter convergence criteria.
  5. Same as before, but with a stricter convergence criteria and more KPOINTs.
  6. Same as before, but with more KPOINTs.

This is only one of many possible optimization schemes that may work for crystals. It may need to be modified to work for your particular system.



Saving and Resuming Sessions in XtalOpt

xo-saveresume.png

How to save your session

XtalOpt will write a small file named xtalopt.state to its working directory that contains the information necessary to resume the session at a later time. The file can be rewritten manually by clicking the "Save Session" button highlighted above, and XtalOpt will automatically save the session every time a structure is updated.

XtalOpt will also write a file "structure.state" in each candidate structure's directory. This file stores XtalOpt-specific information about the structure.



How to resume your session

To resume a session, simply click "Resume stored session" (highlighted above) and select the xtalopt.state file in the working directory of the session you would like to resume. XtalOpt will then begin to load the structures and search parameters. You can monitor the progress with the progress bar that appears at the bottom of the window.

While the structures are loading, you may encounter errors that say:

Error, no (or not appropriate for [OPTIMIZER]) xtal data in [DIRECTORY].

This could be a result of resuming a structure that has not yet done
any local optimizations. If so, safely ignore this message.

As mentioned in the message, these can typically be ignored if it only happens for a handful of structures. This occurs when a structure has been generated in XtalOpt, but it has not completed any geometry optimizations so there are no output files from which to load the geometry. If it happens for a significant number of structures (or structures that are known to have completed at least one geometry optimization step), the output files from the optimizer may be missing or corrupt.

After resuming a session, XtalOpt will ask if you would like to continue the search or enter read-only mode. Read-only mode will not generate new structures or submit geometry optimizations.

Note:
If you are considering resuming a read-only session, take a look at the results.txt file in the working directory. It contains a list of all structures, sorted by enthalpy, with additional useful information. This can save some time when trying to locate the most stable structure of an old search.

The working directories for XtalOpt are relocatable, meaning that the directory containing xtalopt.state and the [gen]x[id] structure folders may be moved, tarred, zipped, etc. and still be resumed at a later time from a different location on the filesystem, or even a different computer.





RandomDock Tutorial


PDF format available here



RandomDock generates random structures of ensembles of molecules by arranging them in 3D space subject to several constraints:

Several of the constraints are parametrized, and may be modified via the user interface shown below.

rd-search.png

After the scene has been generated, the atomic positions are optimized using either ADF, GAMESS, GAUSSIAN or MOPAC. The calculations may be performed on a remote supercomputing cluster by specifying SSH login details, or locally on the user's workstation. Remote calculations are automatically staged, copied, submitted, monitored, retrieved, and analyzed by RandomDock, making searches fully automatic. Configuration of remote computational resources and optimizer input files is performed using the same procedure as XtalOpt.

The default behavior of RandomDock is to generate a single, possibly partial, shell of matrix molecules around the substrate, suitable for producing simple solvation models or studying binding interactions. Alternatively, it can be configured to generate molecular clusters. This mode produces clusters of molecules with randomized positions and orientations of molecules. A RandomDock search will continue until a specified number of scenes have been generated and optimized.

rd-conformers.png

Before any scenes are generated, a cached set of conformations for each molecule is generated. Conformers are relaxed and ranked using the force­field implementations in the OpenBabel library. As shown above, the user specifies a force­field implementation and a number of conformers for each molecule. By checking the “All” option, an exhaustive search is performed for all possible conformations of the molecule. Each conformer is assigned a probability according to the probability distribution (Eq. 1 in the main text). This probability is used during the generation of new scenes to favor usage of stable conformers in both the substrate and matrix molecules.


Generated on Sun Apr 26 2015 01:32:48 for My Project by doxygen 1.8.9.1