This chapter contains information to help system administrators maintain the AMPAC™ license and keep the program easily available to users.
![]() |
Important |
|---|---|
The init_ampac.csh and/or init_ampac.sh scripts must be edited and sourced before AMPAC can be used. | |
When AMPAC is installed for the first time, file permissions must be properly set in order for AMPAC to run correctly. This is done by executing the Set_File_Protection.csh script. Execute the script by changing to the AMPAC installation directory and typing
| ./Set_File_Protection.csh | Input 15.1 |
This should be done by the system administrator (known as "root" on UNIX), since it may require system administrator privileges. Once these permissions are set, they should not need to be changed again.
![]() |
Note |
|---|---|
| The Set_File_Protection.csh script must be run from the AMPAC root directory (AMPAC_DIR). | |
The AMPAC_DIR environment variable specifies the location of the AMPAC directory tree relative to the local filesystem. AMPAC_DIR must be correctly set to enable the AMPAC scripts and utilities to function properly. For example, if AMPAC 8.16 is installed in the /usr/local/ directory, the AMPAC_DIR environment variable must be set to /usr/local/Ampac-8.16. This could be done in csh or tcsh by typing
| setenv AMPAC_DIR '/usr/local/Ampac-8.16' | Input 15.2 |
and in bash, ksh, or sh by typing
| export AMPAC_DIR='/usr/local/Ampac-8.16' | Input 15.3 |
To identify the current shell, type
| echo $0 | Input 15.4 |
In a normal installation, it is too inconvenient to set environment variables every time a user wishes to log in and use AMPAC. The init_ampac.csh and init_ampac.sh scripts, located in the AMPAC installation directory (the same directory pointed to by AMPAC_DIR) are provided to correctly initialize the shell environment automatically when a user logs in. You must edit the scripts to make sure that AMPAC_DIR points to the correct directory.
Open the file init_ampac.csh in a text editor, and find the line that reads
setenv AMPAC_DIR /usr/local/Ampac-8.16
If necessary (if you installed AMPAC somewhere other than in /usr/local/), edit the line to correspond to the path to your AMPAC installation. Save the file, and close the text editor.
# Environment Initialization Script for: # # AMPAC 8.16 with Graphical User Interface # # Contact: Roy Dennington # Copyright 1992-2004 Semichem,Inc. # # Change this entry only: setenv AMPAC_DIR "/usr/local/Ampac-8.16"# ***** Don't change anything below this line ***** # # Test AMPAC_DIR to verify validity # if ( ! -e "$AMPAC_DIR/init_ampac.csh" ) then ... ...
Open the file init_ampac.sh in a text editor, and find the line that reads
export AMPAC_DIR='/usr/local/Ampac-8.16'
If necessary (if you installed AMPAC somewhere other than in /usr/local/), edit the line to correspond to the path to your AMPAC installation. Save the file, and close the text editor.
#!/bin/sh # # Environment Initialization Script for: # # AMPAC 8.16 with Graphical User Interface # # Copyright 1992-2004 Semichem,Inc. # # Change this entry only: export AMPAC_DIR="/usr/local/Ampac-8.16"# ***** Don't change anything below this line ***** # # Test AMPAC_DIR to verify validity # if [ ! -f "$AMPAC_DIR/init_ampac.sh" ] ... ...
The init_ampac.csh (or init_ampac.sh) script must be sourced to set necessary aliases and additional environment variables. This can be done from the command line in csh or tcsh by typing
| source path to your AMPAC installation/init_ampac.csh | Input 15.5 |
and in bash, ksh, or sh by typing
| source path to your AMPAC installation/init_ampac.sh | Input 15.6 |
or
| . path to your AMPAC installation/init_ampac.sh | Input 15.7 |
So, if you are using the bash shell, and your AMPAC installation is in /usr/local/Ampac-8.16/, the command to source the appropriate initialization script is
| . /usr/local/Ampac-8.16/init_ampac.sh | Input 15.8 |
When this file is executed, it will attempt to verify that the AMPAC_DIR variable has been set directly. If it is not set correctly, the script will exit with the error message "Environmental variable $AMPAC_DIR is set incorrectly..." Verify the correct location of your AMPAC installation and re-edit your init_ampac.csh or init_ampac.sh file.
To avoid the inconvenience of sourcing the initialization script prior to each AMPAC job, the appropriate source command should be written into each AMPAC user's .cshrc and .bashrc files. This will ensure that each user's shell environment is automatically initialized for operation of AMPAC, for any shell the user chooses to employ.
Upon purchase of a license to operate AMPAC, you will be provided with a special key file, which will activate the AMPAC program during the term of your license.
When a new license for AMPAC is purchased, a text file named ampac.key is provided via electronic mail or ftp from Semichem™ Customer Service. This file contains information about your AMPAC license and must be copied to the base directory of your AMPAC installation (AMPAC_DIR). The permissions of the ampac.key file should be set so that it is readable by all potential AMPAC users. If ampac.key has not been correctly installed, AMPAC will issue the message "ERROR OPENING AMPAC.KEY FILE" and immediately stop. AMPAC will not run until a valid key has been correctly installed.
It is possible for the ampac.key to become corrupted during the process of transfer over a network and by email. If the ampac.key file has been has been correctly installed but is corrupted, AMPAC jobs will issue the message "AMPAC.KEY FILE IS INVALID" and stop. A special utility is provided with AMPAC to repair the most common forms of key file corruption. Please see keycleaner.exe for information about how to use the keycleaner utility. If keycleaner fails to resolve problem, contact Semichem™ Customer Service for a new key.
The AMPAC license (ampac.key) allows the user to run AMPAC for the duration of the license. During the 45 days prior to the expiration of the license, a warning message will be printed at the top of each AMPAC job notifying the user that the license is about to expire. During this time period, a new license may be purchased from Semichem, who will provide a new ampac.key to replace the expiring one. This will ensure uninterrupted utilization of AMPAC. If the AMPAC license expires, AMPAC will issue the message "WARNING: YOUR KEY HAS EXPIRED!!" and immediately stop. To continue to use AMPAC, a new license must be obtained from Semichem and installed on the computer. To check the expiration date of the current ampac.key, the keycleaner.exe utility (using the "-l" option) may be used to printout license information to the screen. The information includes the term of the license, the license holder, the expiration date, and if the optional Amsol Model Module™ is enabled in the license. A second way to obtain this information is to add the keyword LICENSE to any AMPAC job and run it. This will cause AMPAC to write license information to the output file.
The Amsol Solvation Model Module is an optional feature in AMPAC and will only be available if purchased along with the AMPAC license. If the Amsol Model Module™ is not available with your current license, AMPAC jobs using Amsol keywords (SM5.2, SM5.2R, SM5C, and SM5CR) will fail with the message "ERROR: SM5x REQUIRES A LICENSE." (Note, the COSMO Solvation Model is always available.) You can use the keycleaner utility (with the "-l" option) to determine if the Amsol Model Module is enabled under your AMPAC license (ampac.key). In the output, look the line "Options:" and if "AMSOL" is listed to the right then the Amsol Model Module™ is enabled under your license. Alternately, you can run an AMPAC job with the LICENSE keyword listed on the keyword line in the input file. The resulting output file will contain the line "AMSOL SM5x Option" in the header followed by a "YES" or "NO" indicating whether or not the Amsol Model Module™ is enabled. If you wish to enable the Amsol Model Module™, contact Semichem™ Customer Service.
AMPAC now comes with a special script that can diagnose all of the most common problems that can prevent AMPAC from running correctly. The check_env.csh script will run a series of tests on the AMPAC setup. If it detects a problem, it will report the problem and directions on how to fix it. See check_env.csh for details on how to use the script and the specific tests that will be performed.