The Phenix directory structure

It is helpful to have an idea about the directory structure in Phenix so that you can find Phenix tools that you want to use in your programming. This page describes the overall setup.

The top-level Phenix directory is typically located in the directory referred to by the environmental variable $PHENIX. It contains the following files and folders:

  • bootstrap.py -- Python program used to build and update
  • conda_base -- base for Conda
  • dev_env -- for installing git.lfs
  • modules -- source programs
  • build -- installed programs
  • doc -- installed documentation

Since all Phenix code is in the modules directory, the location of a particular file is often referred to relative to this modules directory. For example, as modules/phenix/phenix/programs/mtriage.py.

Within the modules directory are a big set of directories for different modules of Phenix (including cctbx_project, the computational crystallography project):

Several directories are of particular interest:

  • cctbx_project: Most of the source code for low-level programming is in the cctbx_project directory. This code is documented in the cctbx documentation.
  • phenix: Most of the code for Phenix programming is in the phenix directory (see below)
  • phenix_regression: Regression tests for phenix tools
  • phenix_examples: Tutorials on Phenix tools
  • phenix_html: Documentation on Phenix

The phenix module has the following subdirectories:

  • phenix: source code for most Phenix tools
  • wxGUI: no longer used
  • wxGUI2: source code for Phenix GUI
  • conda_envs: files that define the conda environments

Often, you will add to existing files or create new files within the existing directory structure. If you start a completely new area of Phenix programming, you would create a new directory structure to hold it. Before creating a new directory structure, it should be discussed among Phenix group members.

The phenix/phenix/ subdirectory is further subdivided into:

There are two special subdirectories in the phenix/phenix directory:

  • programs: program files that interface between the user or the GUI and a program
  • command_line: short files that specify what program to run when a user types something like phenix.refine