Menu
Previous Next To support various quantum chemistry packages, it is necessary to create methods for writing input files and reading output files. The more difficult challenge of reading output files has been solved for you by incorporating the cclib package into this software. The cclib package can read output files from ADF, GAMESS, GAMESS-UK, Firefly, Gaussian, Jaguar, Molpro, and ORCA. Methods for creating input files are provided for GAMESS and Gaussian. To install cclib, follow the instructions at cclib.sf.net. Once installed, copy the atomicGlobalMin.py file from the pso directory to the directory where you installed cclib. Then open the energyProgram.cc file inside the pso directory and set the cclibPythonScript variable to the full path of the atomicGlobalMin.py script inside the cclib directory. Recompile the program by typing 'make'. Test the cclib package by running unit tests by typing './unit'. If you see "All tests passed!", then cclib has been installed correctly. Then, if necessary add your quantum chemistry package as follows: 1. Add a one-line define statement to energyProgram.h as follows: #define NAME_OF_YOUR_QUANTUM_CHEMISTRY_PROGRAM UNIQUE_INTEGER 2. Modify energyProgram.cc as follows. Modify the init function by copying the GAMESS or Gaussian program information and modifying it for your quantum chemistry package. Note that the parameters you need to set are listed in the EnergyProgram function definition immediately beneath the init function. Set the program name, executable path, input and output file extensions, and other basic information. If you are using cclib, set the cclib flag to 'true'. You may also list multiple output file types, with a file extension for each. Please list first the output file extension of the file type you want to be read by the program. If you list other file types, these will be saved with the results, but will not be read by this program. 3. Modify energy.cc as follows. First, write a method for creating an input file for your quantum program. To do this, you may copy and modify the createGamessInputFile method. Make sure that your method is called correctly from the createInputFile method and that it is declared in energy.h. Test your input file creation method as follows. Create a resume file by typing './pso LJ7_Sim.inp' and stop the run by pressing control-C. Open LJ7_Sim.res, change the energy function to the name of your quantum package, insert an energy file header, and set the charge and multiplicity. Then type './helper -c LJ7_Sim.res test best'. This will create an input file in a directory called test which you can check for correctness. Second, write a method in energy.cc for reading your quantum program's output file. Make sure your method is called correctly from the readOutputFile method and that it is declared in energy.h. If using cclib to read output files, this step can be skipped. Third, check that your quantum program is called correctly in the doEnergyCalculation method. Programs such as Gaussian require a scratch directory. The scratch directory is specified on line 5 of your input file. If using Gaussian, the pso program tells Gaussian where to put scratch files using the command "export GAUSS_SCRDIR = your_scratch_directory". If you need to modify this command, or change it for another quantum chemistry package, it's listed in the energy.cc file in the two init functions. NOTE: IT IS THE RESPONSIBILITY OF THOSE USING THIS SOFTWARE TO COMPLY WITH THE LICENCE AGREEMENTS OF QUANTUM CHEMISTRY PACKAGE PROVIDERS. PACKAGES SUCH AS GAUSSIAN HAVE STRICT LICENCE AGREEMENTS WHICH SHOULD BE FOLLOWED. Previous Next |