For full access to the source code and documentation, visit the GitHub repository: https://github.com/continuous-symmetry-measure/csm
The CSM (Continuous Symmetry Measure) software calculates continuous symmetry and chirality measures of molecules with respect to a given symmetry point group G. This guide explains how to install the CSM without traditional software installation, by utilizing a tool called Docker.
Docker is a platform that allows software to run inside isolated “containers”, self-contained environments that include all the dependencies and files the software needs. Instead of installing CSM manually, you can use a prebuilt Docker container that comes ready to run. Advantages:
Using Docker involves three key concepts that ensure consistency across different machines:
docker --version
docker info
docker images
docker run --rm teamcsm/csm:v1.3.7b1 csm --help
If you’re working in an environment with a network proxy (e.g., a university or institutional firewall), Docker may need to be configured to access external resources. On Linux/macOS, create or edit the Docker systemd configuration:
sudo mkdir -p /etc/systemd/system/docker.service.d
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
Then add:
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8080/"
Environment="HTTPS_PROXY=http://proxy.example.com:8080/"
After saving, reload and restart Docker:
sudo systemctl daemon-reexec
sudo systemctl restart docker
On Windows or macOS with Docker Desktop, go to:
Settings > Resources > Proxies and set your proxy configuration there.
Ensure that you replace proxy.example.com:8080
with your actual proxy address.
Run the following command in your terminal:
docker pull teamcsm/csm:v1.3.7b1
This will download version v1.3.7b1 of the CSM software to your machine. To verify the image was successfully downloaded, run:
docker images | grep teamcsm/csm
You should see a line indicating that the image teamcsm/csm with the v1.3.7b1 tag is available locally.
If your container name is teamcsm/csm:v1.3.7b1
You can download the input file for the example from here On Linux you may want to create an alias:
alias csm_container_name='docker run -it -v ${PWD}:/data teamcsm/csm:v1.3.7b1 csm'
To analyze a specific molecule (for example, in the C2 point group), use this command:
# directly
docker run -it -v ${PWD}:/data teamcsm/csm:v1.3.7b1 csm exact c2 --input /data/18crown6.mol --output /data/c2-results --keep-structure --remove-hy
# or using the alias (on Linux):
csm_container_name exact c2 --input 18crown6.mol --output c2-results --keep-structure --remove-hy
Expected result: C2 SYMMETRY: 0.004770
Below is a full example of a CSM execution and its output:
PS C:\Users\csm_openu> docker run -it -v ${PWD}:/data teamcsm/csm:v1.3.7b1 csm exact c2 --input /data/18crown6.mol --output /data/c2-results --keep-structure --remove-hy
CSM version 1.3.7b1
exact c2 --input /data/18crown6.mol --output /data/c2-results --keep-structure --remove-hyMolecule: 18crown6.mol
1 group of length 6
1 group of length 12
The permutation found maintains 100.0% of the original molecule's structure
The permutation found contains 0 invalid cycles. 100.00% of the molecule's atoms are in legal cycles
There are 9 cycles of length 2
C2 SYMMETRY: 0.004770
CSM by formula: 0.004770
# directly
docker run -it -v ${PWD}:/data teamcsm/csm:v1.3.7b1 csm exact c3 --input 18crown6.mol --output c3-results --keep-structure --remove-hy
# or using the alias (on Linux):
csm_container_name exact c3 --input 18crown6.mol --output c3-results --keep-structure --remove-hy
Expected result: C3 SYMMETRY: 10.2635
docker run -it
- Runs the container interactively with a terminal.-v ${PWD}:/data
- Mounts the current working directory into the container at path /data,
so input and output files are accessible.exact
- Use the exact algorithm for CSM calculation.C2
- The desired point group.--input
- Input molecular file (accepted formats: SDF, XYZ, MOL, PDB).--output
- Output directory where results will be saved.--keep-structure
- Use the structure preserving permutation algorithm to maintain the bonding structure of the molecule. This requires connectivity data in the molecular files.remove-hy
- Ignore the Hydrogen atoms to keep the calculation faster.See all available commands here: https://github.com/continuous-symmetry-measure/csm
For academic use, please cite the relevant CSM publications as listed in the GitHub README at: https://github.com/continuous-symmetry-measure/csm.