The basis set may either be taken from the program library, or may be specified explicitly, or any combination. A group of basis functions is defined by a data card specifying a set of primitive gaussians, optionally followed by one or more cards specifying particular contractions of primitives to be included in the final basis. When all contraction definitions have been read (delimited by the next data card other than a contraction definition), the remaining primitives in the set which have not been included in any contraction set are added uncontracted to the basis set. Optionally, the basis function type can be chosen using the CARTESIAN or SPHERICAL commands.