Names of C++ classes should begin with a capital letter, and not contain any hyphens. Class names comprised of multiple words should have each word capitalized. Example:
DisplayDeviceClasses derived from a base class should generally prepend a descriptive word to the base class name, unless the new word begins with a number in which case the additional word should be added to the end of the base class name. Examples:
CaveDisplayDeviceand
Displayable3D
Names of variables which are members of C++ classes follow the same formatting rules as names of classes, except variable names should begin with a lower case letter. Quite often, if the variable is an instance of a particular class, the name of the variable is identical to the class name but with a lower case initial letter.
Names of functions which are members of C++ classes should be in all lower case letters, and use hyphens to separate distinct words in their names. Example:
Scene::_draw( * )
The names of global variables in VMD follow the same rules as for variables which are members of a particular class. It is recommended to use one of the following suggestions when naming a global variable:
scene
moleculeList
Global functions, which are found mainly in the files utilities.C and Global.C, follow one of the following two rules:
voidVMDinitUI (in Global.C)
doubletime_of_day ( in utilities.C)
Each C++ class, except for very small classes used by only a small number of other classes, should be placed in a separate .h file, and if necessary a .C file as well. The base name of the files for the class should be identical to the class name itself. Examples:
DisplayDevice.h and DisplayDevice.CC source code files should have a .c extension (that is, use a lower case c), while C++ files should have a .C extension. ALL header files should have a .h extension, and any Fortran files should have a .f extension. Latex files should end in .tex.
NameList.h (no NameList.C required)
Documentation files, which are in Latex format, all contain a .tex extension and begin with a prefix of one of the following: vmd, ig, pg, or ug. Files with a vmd prefix are used by all the Guides; files with the remaining prefixes are used only by that particular Guide. For all files except the main driver Latex files for the Guides and the Book, the filenames contain a hyphen after the prefix and a concluding descriptive word. No capital letters are used. Examples:
vmd_macros.tex
pg_chapters.tex
ug.tex