Obtaining Code#
Full Code from GitHub#
The ChimeraX repository is hosted on GitHub. To get the full codebase:
# If you have SSH access
git clone git@github.com:RBVI/ChimeraX.git
# If not
git clone https://github.com/RBVI/ChimeraX.git
Alternatively, you can make a clone of the repo to your GitHub account and add the RBVI repo as an upstream repository.
# If you have SSH access
git remote add upstream git@github.com:RBVI/ChimeraX.git
# If not
git remote add upstream https://github.com/RBVI/ChimeraX.git
From there you can issue pull requests for the RBVI ChimeraX repository.
Code from the ChimeraX Distribution#
Most of ChimeraX is written in Python and that code is included in the ChimeraX distribution:
Windows: ChimeraX/bin/Lib/site-packages/chimerax
macOS: ChimeraX.app/Contents/lib/python3.x/site-packages/chimerax
Linux: chimerax/lib/python3.x/site-packages/chimerax
The ‘3.x’ in the latter two lines depends on the exact version of Python 3 being used by your
version of ChimeraX, but is not less than 3.7. Typing, for example, chimerax/lib/python3.<TAB>
should cause your shell to auto-complete the path for you.
Small modifications to the code can be tested by simply editing the Python code and restarting ChimeraX.
There is documentation for how to use a ChimeraX distribution to develop bundles elsewhere on this website.
Git Cheat Sheet#
Here are a minimal set of commands to get started using git:
Git associates a user name and email address with all check-ins. The defaults are based on your
USERNAMEand your computer’s hostname. The email address is usually wrong. To explicitly set those values:git config --global user.name "Your Name" git config --global user.email you@example.comMake local copy of repository:
git clone https://github.com/RBVI/ChimeraX.gitUse the develop branch (the master branch is only used for releases):
git switch developTo update repository to latest version:
git pullAdd current state of file to the repository:
git add "filename(s)"Commit all changes to repository (added files and changes to those added files):
git commit -aCopy local repository changes to master repository:
git pushDiff from previous to current revision of file (ignores additions):
git whatchanged -n 1 -p <file>Diff to previous commit of file:
git diff HEAD^ <file>