CCL Home Page
Up Directory CCL README
This directory contains several Python modules that are useful
in computational chemistry:  (requires, and

  High-level I/O with PDB files. Allows you to deal with PDB files as if they
  were lists of residues and atoms. Example:
     for residue in PDBConfiguration('protein.pdb'):
         for atom in residue:
             print, atom.position

  Unified access to compressed and uncompressed files, plus access
  to text files as a sequence of lines. ONLY FOR UNIX SYSTEMS! (requires and

  Automatic derivatives. Calculates analytical derivatives numerically, given
  only the original function, to any order and for any number of
  variables. Example:
     x = DerivVar(1.1,0)
     y = DerivVar(0.44, 1)
     f = exp(x**2+y**2)
     print f
     (4.06982499598, [8.95361499116, 3.58144599646]) (requires and

  Automatic first-order derivatives. This module is a subset of and compatible as far as possible. The restriction
  to first-order derivatives makes it faster. (requires,,

  Automatic gradient and force constant calculation for potential
  functions (or any function).
     def harmonic(k, r1, r2):
          dr = r1-r2
	 return k*dr*dr
     harmonic_g = PotentialWithGradientsAndForceConstants(harmonic)
     energy, gradients, force_constants = \
            harmonic_g(100., Vector(0,3,1), Vector(1,2,0))
     print energy
     print gradients
     print force_constants
     [Vector(-200.0,200.0,200.0), Vector(200.0,-200.0,-200.0)]
     [[200.0, 0.0, 0.0, -200.0, 0.0, 0.0],
      [0.0, 200.0, 0.0, 0.0, -200.0, 0.0],
      [0.0, 0.0, 200.0, 0.0, 0.0, -200.0],
      [-200.0, 0.0, 0.0, 200.0, 0.0, 0.0],
      [0.0, -200.0, 0.0, 0.0, 200.0, 0.0],
      [0.0, 0.0, -200.0, 0.0, 0.0, 200.0]] (requires

  3d-vectors, used by the three other modules.

  Simplified substitute for the module "umath" from the
  numerics package. Use only if you don't have the
  numerics package. This module is used by all the other
  modules in this directory.

Where to get "python":

Here's the list of FTP sites:

  U.S. Sites in /pub/python/ (Python's home site) in /pub/plan/python/ in /languages/python/> in /graphics/graphics/sgi-stuff/python/ (often busy) in /programming/languages/python/ in /pub/lang/python/ 

  European sites in /pub/python/ in /pub/languages/python/ in /pub/lang/python/ in /mirrors/uunet/languages/python/ in /pub/python/ in /software/sources/python/ in /pub/comp/programming/languages/python/ 

  Australian sites in /pub/python/ 

There is also a Web page with all information that anyone could
possibly want about Python at And the
Usenet group comp.lang.python for further questions.

The numerics package mentioned above is currently in alpha test.
Anyone interested in contributing to development and testing should
join the Python Matrix SIG by sending a message containing the line
"subscribe matrix-sig " to  The
numerics package provides complex numbers and fast arrays, plus a
number of other useful features for numerical work.
Modified: Tue Mar 5 17:00:00 1996 GMT
Page accessed 7474 times since Sat Apr 17 21:35:45 1999 GMT