Warning: This page uses Cascading Style Sheets. We recommend you upgrade to a current version of your favourite browser.

MOLPAKcposs logo
Project background DMACRYS licencing Publications Computational notes

Running MOLPAK on xenon

The MOLPAK/DMACRYS process is used to calculate crystal structures for a given rigid molecular probe. MOLPAK (J. R. Holden, Z. Du and H. L. Ammon, J. Comput. Chem., 14, 422-437, 1993) performs the search for crystal structures and DMACRYS (Welch GWA, Karamertzanis PG, Price SL, Leslie M, in preparation ) performs the subsequent lattice energy minimisations on these structures. NEIGHCRYS is a program used to prepare the MOLPAK output for input into DMACRYS. The search and initial minimisation is carried out automatically. If further minimisations are required then they must be re-submitted manually. The analysis of final structures is also performed manually.

Ensure .cshrc file has appropriate paths ("cd ~" then "vi .cshrc")

File setup

Brief descriptions of the files used are given in this webpage.

  1. Once you have carried out a lattice energy minimisation, Copy bondlengths, cadpac.charges (punch file), dmarel.axis, pote.dat (pots), molpak.xyz, minspec (this file specifies the parameters used in the minimisation), MOLPAK.NAME, onemolpak.csh and the version of make_files.pl relevant to your potential to the working directory. Renaming files as necessary (file names must be exactly as specified above).
  2. Type "./make_files.pl" and answer the questions that follow to set up the molpak run;
    1. First line can be any title you like
    2. Next line should be 8 characters (eight character CSD code, or six character CSD code followed by 00 to follow the suggested naming convention).
    3. When asked to chose WMIN(1) or DMAREL(2), choose DMAREL(2).
    4. All other answers are usually default, i.e. just press enter.

Queue Submission

  1. EITHER running as one single job
    Submit runjobs to xenon using onemolpak.csh (qsub onemolpak.csh). When running, runjobs will create a subdirectory for each packing type (AA, AB etc ) and place the associated files in these directories. It will then run each of the master.com files in turn, producing the resulting files in the appropriate subdirectories. Once the search is complete, the output files will be copied back from your scratch area on Xenon to the relevant directory on your home file space (then deleted from the scratch area).

    OR running as x smaller jobs
    Create x subdirectories, and copy bondlengths, cadpac.charges (punch file), dmarel.axis, pote.dat (pots), molpak.xyz, minspec, MOLPAK.NAME, molpak.csh and runjobs to each. Then copy the relevant molpak_??.input, name_??_master.com and search_??.input files to the corresponding subdirectory. For example, you may choose to create subdirectories a, b, c, d and f and run searches on packing types AA, AB, AC etc from subdirectory a, BA BB, BC etc from subdirectory b, and so on; in this case molpak_A?.input, name_A?_master.com and search_A?.input must be moved to a, molpak_B?.input, name_B?_master.com and search_B?.input moved to b etc. Then submit each molpak.csh (from each of the subdirectories) to the queue. Once each search is complete, the output files will be copied back from your scratch area on Xenon to the relevant subdirectory on your home file space (then deleted from the scratch area).

*To check on a job while it is running, type "qstat -u userid" (userid is usually your initials) to see which node the job is running on, e.g. comp12. Then type "rlogin comp12", then go to your scratch area using "cd ../../scr/userid" and you will see a directory that has been created for the Molpak run, you can go into this directory and look at the results so far. Use "ls -lt" to check on search progress.

Use Script postSearch to move Invalid Structures and Compile Details of Valid Structures

Copy Analysis.csh and the relevant version of Analysis from /home/cposs/ to working directory. Edit Analysis.csh to ensure that it will run the correct version of Analysis. Also, change the arguments, as necessary. The first argument is the number of iterations of DMACRYS that will be carried out. The default is 3 (0 will just discard any structures which were not tru minima in the first run of DMACRYS). The second number is the number of minima that will be kep. The default is 10,000, and this should be more than sufficient. The third number is the cutoff in kJ mol-1 and the default is 15. Of the second and third numbers, the limit that is reached first will stop further structures being kept in stable_list. In the directory, submit Analysis.csh, by typing "qsub Analysis.csh".

  1. Structures that have had inufficient iterations and move the entire structure directory (*-1) to moreiterations;
  2. Structures with negative curvature and move entire structure directory to negativecurvature;
  3. Structures with negative eigenvalue(s) and move entire structure directory to lowersymm.

It will then compile details of the valid structures in a file that can be read into excel, another file, *_reducedcells, will be produced containing the reduced cell constants (calculated by nbslattice.exe). There will be files containing details for all valid structures (allreducedcells and completespreadsheet) and for each space group individually (e.g. aa_reducedcells and p1). These files will all be moved to a new subdirectory called validStrutcuresForSpreadsheet.

Deal with Insufficient Iterations

The current default is to use a maximum of 1000 iterations ("MAXI 1000" in minspec). Rarely, a minimum is not reached in 1000 iterations and the output structure does not represent a lattice energy minimum and is therefore invalid. Structures affected have been moved to moreiterations by the postSearch script; the corresponding dmain files should be resubmitted to DMAREL with a greater value of MAXI, following the method given in Deal with Negative Curvature below.

Deal with Negative Curvature

For structures with negative curvature the minimisation is not valid (a minimum has not been found) and it is necessary to change the step size for the DMAREL calculation to try the minimisation again. These structures have been moved to negativecurv by the postSearch script. Copy changeStep and changeStep.csh to negativecurv. Create a new version of minspec in negativecurv with "MAXD 0.9" instead of "MAXD 0.5". Submit changeStep.csh to the queue.

Check for Negative Eigenvalues

These structures have been moved to lowersymm by the postSearch script. This section will be expanded….

Compiling Results into Spreadsheet

Sftp all files in validStructuresForSpreadsheet to your PC. They can be opened in Excel (using the space delimiter option to make sure the numbers are read into columns appropriately; File - Open - all files - click on file - click delimiter - Next - chose space - Finish).

Open completespreadsheet in Excel. Then open allreducedcells onto a new worksheet in Excel. Select all (Cntrl A) in the worksheet containing allreducedcells and copy (Cntrl C), then paste (Cntrl V) onto the worksheet containing completespreadsheet. They should line up (i.e. equal numbers of structures in both files), check this is the case.

A similar method can be used for each space group in turn. The structures in each space group can then be grouped to show which are equivalent (made easier by using the sort command in Excel to compare lattice parameters); and each group of equivalent structures can be ordered in terms of energy. The lowest energy structure from each group (for all space groups) can then be compiled onto a new worksheet, and these unique structures then ordered in terms of energy.

Use Platon to calculate reduced cells for the structures with the lowest lattice energy; e.g. for structures in the bottom 5 or 10kJmol-1 energy range. Hopefully the experimental structure(s) and likely polymorphs will be within these lowest energy structures. Create a directory called platon and copy over the x.p1res files for these low energy structures (Platon must be run from a separate directory otherwise some files from the MOLPAK search will be overwritten). Note that we have already obtained the reduced cells from the .nbs files, however these conserve the symmetry of the given packing type. Platon will also search for reduced cells that have different symmetry than the starting packing type. In the directory platon use the command "platon x.p1res > x_??_reduced" (?? = packing type), then click "calc all" (top of second column in Platon menu). The resulting x_??_reduced file contains the reduced cell constants in the "transformation matrix" section of the file and can be found by searching for "Reduced ". Add these reduced lattice parameters to the spreadsheet.

Calculate the volume per molecule for each structure by dividing the final cell volume by the appropriate value of Z for each structure. Construct a scatterplot with final lattice energy on the y-axis and Vol/Z on the x-axis. This may help to decide on likely crystal structures; those towards the bottom left of the plot are more favourable in terms of energy and volume.

Further calculations may be used to judge which of the low energy predicted crystal structures are likely to exist.

Warnings and known problems

  1. The end of the final line in bondlengths, cadpac.charges, dmarel.axis, pote.dat and molpak.xyz is important; it must have an invisible carriage return but no blank line at the end(!). Perhaps the easiest way to achieve this is to copy a file that is known to work and make the relevant structure-dependent changes, but be careful not to touch the end of the last line!
  2. Sometimes the search will "hang" in the middle of a DMAREL minimisation, when it can't reach a minimum. Check periodically by logging onto the xenon node (see * above); if no new files have been created for a long time (the time taken can be determined using "ls -lt" when logged onto the node) then it is probably stuck. The only way at present to get round this, is to stop the job. Be sure to copy over all the results so far from the scratch area to your home filespace ("cp -r * home/userid/directoryname"), then stop the job using "qdel -f jobid". Make a new directory for the packing types that have not yet been searched, move in all corresponding files and submit the remainder of the job again.

© UCL Chemistry Department 2022. This page was last updated on 17 August, 2022. If you have any problems with this page please email the WebMaster