| CHARMm Principles |

CHARMm uses empirical energy functions to describe the forces on atoms in molecules. These functions, plus the parameters for the functions, constitute the CHARMm force field. Well-validated energy and force calculations form the core of a broad range of calculation and simulation capabilities, including calculation of interaction and conformational energies, local minima, barriers to rotation, time-dependent dynamic behavior, free energy, and vibrational frequencies.
This book describes CHARMm and many of the functions of CHARMm. This first chapter provides an overview of CHARMm activities and basic information on how CHARMm works. It is included, along with Chapters 2 through 5, in the first part of the book describing basic CHARMm activities. The remaining chapters in Part Two describe several CHARMm advanced calculations.
This chapter explains

Before you begin
The software must be ready. That is, you must have properly licensed software installed and running. If you want to run CHARMm in a stand-alone mode, you need the CHARMm software. If you want to use CHARMm as part of your QUANTA software, you need the QUANTA software including CHARMm.
If you are using CHARMm in a stand-alone mode, type the following to access the program:
> charmm < input.file > outputIf you are using CHARMm from within QUANTA, access it by displaying the CHARMm menu on the QUANTA main menu bar. Many CHARMm commands can be executed using the menu-driven QUANTA interface. Or, you can enter commands on the QUANTA command line. For information on using CHARMm in QUANTA, see Chapter 3, "Calculating and Minimizing Energy," in QUANTA Generating and Displaying Molecules.


As illustrated in this figure, the activity flow is as follows:
1. Read model definitions -- Information about residues, the basic chemical units that comprise all models, is stored in residue topology files (RTF). The atoms, atomic properties, bonds, bond angles, torsion angles, improper torsion angles, hydrogen bond donors, acceptors, and antecedents, and non-bonded exclusions are all specified on a per residue basis.
6. Calculate energy -- The main purpose of CHARMm is the evaluation and manipulation of the potential energy of a macromolecular system. Before the energy of a structure can be evaluated and manipulated, the following must be available:
7. Perform calculations and simulations -- This is the point at which the process diverges. Using information in the PSF and parameters files and the energy data you have calculated, you can do any of a number of things at this point including molecular dynamics, free energy perturbation, and imposing periodic boundaries.
CHARMm is a command-driven program controlled by entering commands either directly and interactively or from a command file. Input command files are constructed using CHARMm commands sequentially to perform a series of operations. 
Commands and command files
A command file for CHARMm must begin with a title. This title can describe the overall purpose of the calculation or contain other information to document the run.
* Example of CHARMm titleCommand line
* Test CHARMm minimization and dynamics run
*
Each command line consists of a command and keywords, possibly followed by other data. The command line is scanned in free-field format.
CHARMm provides a versatile facility for reading in and writing out data. You can enter data into CHARMm in two ways: 
Input and output operations

| 1
Dynamics trajectories can be stored in a machine-independent, hexadecimal format.
|
Converting file formats
The following example contains a script for converting files from ASCII text to binary format, thus creating binary topology and parameter files:
* ...
* Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992
* Molecular Simulations Incorporated
* Confidential and Proprietary: All Rights Reserved
* ...
* ...
* This input file will create binary data files
* ...
*
upper
open read unit 11 card name masses.rtf
read rtf unit 11 card
close unit 11
open read unit 11 card name amino.rtf
read rtf unit 11 card appe
open read unit 12 card name parm.prm
read para unit 12 card
open writ unit 12 file name "AMINO.BIN"
writ rtf unit 12 file
* ...
* Topology File for CHARMm Version 22 (Polar Hydrogens Only)
* ...
* ...
* Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992
* Molecular Simulations Incorporated
* Confidential and Proprietary: All Rights Reserved
* ...
* Includes topology definitions for the twenty naturally
* occurring
* amino acids, some commonly used patches, and water.
* Hydrogens are specified for polar atoms (such as N and O).
* ...
* Latest creation of binary file: $Date: 94/12/27 17:38:27 $
* ...
*
open writ unit 13 file name "PARM.BIN"
writ para unit 13 file
* ...
* Parameter File for CHARMm Version 22
* ...
* Includes parameters for both polar and all hydrogen topology
*files
* ...
* Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992
* Molecular Simulations Incorporated
* Confidential and Proprietary: All Rights Reserved
* ...
* Dihedrals are presumed to be automatically generated and
* should be totally specified, i.e. amide bonds have 4 dihedral
* terms and ethane has 9 dihedral terms. Check the CHARMm PSF
* if necessary.
* This does not necessarily imply multiple periodicity.
* ...
* Latest creation of binary file: $Date: 94/12/27 17:38:27 $
* ...
* stop

CHARMm parameters
The SET command sets up a command line parameter. Command line parameters are substituted into the command line by the command line reader when it encounters the symbol @.
SET outfile = myjobFor more information on parameters, see Using parameter files.
OPEN UNIT 1 WRITE CARD NAME @outfile.dat
CHARMm variables can be used in titles or in conjunction with CHARMm parameters. You can query the current value of a number of CHARMm variables by placing a question mark before the variable name. For example, if you use ?VDW, you get the current van der Waals energy reported.
CHARMm uses a distinct system of units, the AKMA measurement system. The following table lists the units used in CHARMm in both AKMA and SI units:
CHARMm measurement units
Using the AKMA system, the unit of time is 4.888821E-14. Twenty AKMA time units equal 0.978 picoseconds. Although CHARMm computes time using AKMA units, output is usually expressed in picoseconds.
The following table lists the dimensions of various CHARMm 25 arrays. These values apply to all versions of CHARMm typically distributed. For Cray supercomputers, both a smaller and a larger configuration are available.
CHARMm array dimensions