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. ChimeraX 1.0 and 1.1 use 3.7. ChimeraX 1.2 uses 3.8. Later ChimeraX versions may use even later versions of Python 3.
Small modifications to the code can be tested by simply editing the Python code and restarting ChimeraX.
The Python and C++ ChimeraX source code is available at the ChimeraX GitHub repository.
How to use Git¶
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 firstname.lastname@example.org
Make local copy of repository:git clone https://github.com/RBVI/ChimeraX.git
Use the develop branch (the master branch is only used for releases):git switch develop
To update repository to latest version:git pull
Add 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 -a
Copy local repository changes to master repository:git push
Diff 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>