Chapter 16. Package Administration

Abstract

This chapter contains information to help system administrators maintain the AMPAC™ license and keep the program easily available to users.

Table of Contents

Environment Administration (UNIX-based operating systems)
Set the Proper File Permissions.
Set the AMPAC_DIR Environment Variable.
Source the init_ampac Environment Initialization Script.
License Administration
Installing the ampac10.key Key File
Dealing with Corrupted Keyfiles
Getting License Information from AMPAC
Troubleshooting
Using the check_env.sh script

Environment Administration (UNIX-based operating systems)

[Caution] Caution

The init_ampac.csh and/or init_ampac.sh scripts must be edited and sourced before AMPAC can be used.

Set the Proper File Permissions.

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.sh script. Execute the script by changing to the AMPAC installation directory and typing ./Set_File_Protection.sh

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] Note

The Set_File_Protection.sh script must be run from the AMPAC root directory (AMPAC_DIR).

Set the AMPAC_DIR Environment Variable.

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 10.1 is installed in the /usr/local/ directory, the AMPAC_DIR environment variable must be set to /usr/local/Ampac-10.1. This could be done in csh or tcsh by typing

setenv AMPAC_DIR '/usr/local/Ampac-10.1'

and in bash, ksh, or sh by typing

export AMPAC_DIR = '/usr/local/Ampac-10.1'

To identify the current shell, type

echo $0

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.

Edit the init_ampac.csh script.

Open the file init_ampac.csh in a text editor, and find the line that reads:

setenv AMPAC_DIR /usr/local/Ampac-10.1

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 10.1 with Graphical User Interface
#
#    Contact: Roy Dennington
#    Copyright 1992-2009 Semichem, Inc.
#
#

set NeedPathAppend
if ( $?AMPAC_DIR ) then
  unset NeedPathAppend
endif

# Change this entry only:
setenv AMPAC_DIR "/usr/local/Ampac-10.1"    1

# ***** Don't change anything below this line *****

#
# Test AMPAC_DIR to verify validity
#

if ( ! -e "$AMPAC_DIR/init_ampac.csh" ) then
...
...
				

1

Edit this line to correspond to the path to your AMPAC installation.

Edit the init_ampac.sh script.

Open the file init_ampac.sh in a text editor, and find the line that reads:

export AMPAC_DIR='/usr/local/Ampac-10.1'

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 10.1 with Graphical User Interface
#
#    Contact: Roy Dennington
#    Copyright 1992-2009 Semichem, Inc.
#
# Change this entry only:
#
AMPAC_DIR="/usr/local/Ampac-10.1"    1
export AMPAC_DIR

# ***** Don't change anything below this line *****

#
# Test AMPAC_DIR to verify validity
#

if [ ! -f "${AMPAC_DIR}/init_ampac.sh" ]
...
...
				

1

Edit this line to correspond to the path to your AMPAC installation.

Source the init_ampac Environment Initialization Script.

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

and in bash, ksh, or sh by typing

source path to your AMPAC installation/ init_ampac.sh

or

. path to your AMPAC installation/init_ampac.sh

So, if you are using the bash shell, and your AMPAC installation is in /usr/local/Ampac-10.1, the command to source the appropriate initialization script is

. /usr/local/Ampac-10.1/init_ampac.sh

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.

License Administration

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.

Installing the ampac10.key Key File

When a new license for AMPAC is purchased, a text file named ampac10.key is provided via electronic mail or ftp from Semichem™ Customer Service. This file contains information about your AMPAC license and must correctly installed in one of the following locations:

  • User specified directory. If environmental variable, AMPAC_KEYDIR, is set, then AMPAC will look for the key file in the directory specified by it. That directory can be any directory for which the user has access and permissions to.

  • Program data directory (Windows Only). Windows has a directory dedicated for application data that is accessible by all users. Within that directory, users can create a subdirectory "Semichem" and place the key file in it. For Windows Vista, Windows 7, and Windows 8, the correct directory is "C:\AppData\Semichem", but for Windows XP use "C:\Documents and Settings\All Users\Application Data\Semichem".

  • Home Directory. This option corresponds to the user's home directory--$HOME/.semichem on Unix platforms and the Semichem subdirectory of the user-specific "My Documents" directory on Windows.

  • Ampac directory. This is the base directory of the AMPAC installation (AMPAC_DIR). This option is for backwards compatability.

Starting with AMPAC 10, there are multiple places where Ampac will look for the key file. (Previously, the key was always located in the AMPAC directory.) AMPAC will look through each of the possible locations (listed above) in order and will use the first one found. If it is unable to locate the file, AMPAC will report "AMPAC10.KEY FILE NOT FOUND" and stop.

The permissions of the ampac10.key file should be set so that it is readable by all potential AMPAC users. If ampac10.key has not been correctly installed, AMPAC will issue the message "ERROR OPENING AMPAC10.KEY FILE" and immediately stop. AMPAC will not run until a valid key has been correctly installed.

Dealing with Corrupted Keyfiles

It is possible for the ampac10.key to become corrupted during the process of transfer over a network and by email. If the ampac10.key file has been has been correctly installed but is corrupted, AMPAC jobs will issue the message "AMPAC10.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 for information about how to use the keycleaner utility. If keycleaner fails to resolve problem, contact Semichem™ Customer Service for a new key.

Getting License Information from AMPAC

The AMPAC license (ampac10.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 ampac10.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 ampac10.key, the keycleaner 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.

Troubleshooting

Using the check_env.sh script

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.sh 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.sh for details on how to use the script and the specific tests that will be performed.