{"id":39803975,"url":"https://github.com/jewettaij/superpose3d","last_synced_at":"2026-01-18T12:36:15.568Z","repository":{"id":26941676,"uuid":"111981267","full_name":"jewettaij/superpose3d","owner":"jewettaij","description":"register 3D point clouds using rotation, translation, and scale transformations.","archived":false,"fork":false,"pushed_at":"2025-08-20T03:16:58.000Z","size":329,"stargazers_count":42,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-19T00:02:22.364Z","etag":null,"topics":["3d","cryo-em","cryoem","point-cloud","point-cloud-registration","registration","rmsd","scale-transformations","structure-comparison"],"latest_commit_sha":null,"homepage":"https://jensenlab.caltech.edu/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jewettaij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-25T06:10:58.000Z","updated_at":"2025-08-20T03:17:01.000Z","dependencies_parsed_at":"2024-08-12T05:54:50.835Z","dependency_job_id":null,"html_url":"https://github.com/jewettaij/superpose3d","commit_stats":{"total_commits":121,"total_committers":2,"mean_commits":60.5,"dds":"0.016528925619834656","last_synced_commit":"9874b7db370b8d3d4fbd8033f6dc1066ae5be151"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/jewettaij/superpose3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jewettaij%2Fsuperpose3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jewettaij%2Fsuperpose3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jewettaij%2Fsuperpose3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jewettaij%2Fsuperpose3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jewettaij","download_url":"https://codeload.github.com/jewettaij/superpose3d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jewettaij%2Fsuperpose3d/sbom","scorecard":{"id":517134,"data":{"date":"2025-08-11","repo":{"name":"github.com/jewettaij/superpose3d","commit":"8c823e4af7e646e70ff79b9409ddb77c5ed5560a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":10,"reason":"SAST tool detected: CodeQL","details":["Info: SAST configuration detected: CodeQL","Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jewettaij/superpose3d/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/jewettaij/superpose3d/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/jewettaij/superpose3d/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/jewettaij/superpose3d/codeql-analysis.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T02:07:54.762Z","repository_id":26941676,"created_at":"2025-08-20T02:07:54.763Z","updated_at":"2025-08-20T02:07:54.763Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","cryo-em","cryoem","point-cloud","point-cloud-registration","registration","rmsd","scale-transformations","structure-comparison"],"created_at":"2026-01-18T12:36:14.663Z","updated_at":"2026-01-18T12:36:15.550Z","avatar_url":"https://github.com/jewettaij.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://img.shields.io/circleci/build/github/jewettaij/superpose3d/master)](https://circleci.com/gh/jewettaij/superpose3d)\n[![codecov](https://codecov.io/gh/jewettaij/superpose3d/branch/master/graph/badge.svg)](https://codecov.io/gh/jewettaij/superpose3d)\n[![GitHub](https://img.shields.io/github/license/jewettaij/superpose3d)](./LICENSE.md)\n[![PyPI Downloads](https://img.shields.io/pepy/dt/superpose3d)](https://pepy.tech/projects/superpose3d)\n[![PyPI - Version](https://img.shields.io/pypi/v/superpose3d)](https://pypi.org/project/superpose3d/)\n[![python-versions](https://img.shields.io/pypi/pyversions/superpose3d.svg)](https://pypi.org/project/superpose3d/)\n[![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/jewettaij/superpose3d)]()\n\n\n\nsuperpose3d\n===========\n\nNote: There is a ***C++ version*** of this repository\n[***here***](https://github.com/jewettaij/superpose3d_cpp).\n\n##  Usage\n\n```python\ndef Superpose3D(X,    # \u003c-- Nx3 array of coords for the \"frozen\" point cloud\n                x,    # \u003c-- Nx3 array of coords for the \"mobile\" point cloud\n                # ---- optional arguments: ----\n                w = None,        # optional weights for the calculation of RMSD\n                allow_rescale=False,   # attempt to rescale mobile point cloud?\n                report_quaternion=False)      # report rotation angle and axis?\n```\n\nSuperpose3D() takes two lists (or numpy arrays) of xyz coordinates\n(*of the same length*, **N**) representing two ordered sets of points\n(\"clouds\", **X** and **x**).\nTreating them as rigid objects, \"Superpose3D()\" superimposes\nthem using **rotations**, **translations**,\nand (optionally) **scale** transformations\nin order to minimize the root-mean-squared-distance (RMSD)\nbetween corresponding points from either cloud, where RMSD is defined as:\n\n\u003cimg src=\"http://latex.codecogs.com/gif.latex?\\large\u0026space;RMSD=\\sqrt{\\,\\frac{1}{N}\\,\\sum_{n=1}^N\\,\\,\\sum_{i=1}^3 \\left|X_{ni}-\\left(\\sum_{j=1}^3 cR_{ij}x_{nj}+T_i\\right)\\right|^2}\"/\u003e\n\n...where:\n```\n   R_ij = a rotation matrix    (a 3x3 numpy array representing the rotation. |R|=1)\n   T_j  = a translation vector (a 1-D numpy array containing x,y,z displacements)\n    c   = a scalar             (a number. optional. 1 by default)\n```\nThis function returns a 4-tuple containing the optimal values of:\n```\n   (RMSD, R, T, c)\n```\n*Note:* The point clouds must contain the same number of points (N).\n\n*Note:* This function does not attempt to determine *which* pairs of points\nfrom either cloud correspond.  Instead, it infers them from the order of the\narrays.  (It assumes that the *i'th* point from *X* corresponds to the *i'th*\npoint from *x*.)  More generally, the [open3d](https://www.open3d.org/) python [module](https://pypi.org/project/open3d/) supports the IPC algorithm, and works with unordered point clouds of arbitrary size.  (Usage example [here](https://github.com/jewettaij/superpose3d/issues/5). *Also see: [link1](https://en.wikipedia.org/wiki/Point_set_registration), [link2](https://en.wikipedia.org/wiki/Iterative_closest_point), [link3](https://arxiv.org/abs/2001.07715), [link4(protein-alignment)](http://www.rbvi.ucsf.edu/Research/projects/minrms/).*)\n\n\n### Rotation angles, axes, and quaternions\nIf the rotation angle and axis are needed, then set the *report_quaternion*\nargument to *True*. In that case, the function will return this 4-tuple instead:\n```\n   (RMSD, q, T, c)\n```\n...where *q* is a numpy array of size 4.  The first element of *q* will store\n*cos(θ/2)* (where *θ* is the rotation angle).  The remaining 3 elements of *q*\nform a vector (of length *sin(θ/2)*), pointing along the axis of rotation.\nEquivalently, *q* is the\n[quaternion corresponding to rotation *R*](https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation).\n\n### Weighted RMSD\nA weighted version of the RMSD minimization algorithm is also available\nif the caller supplies an extra argument specifying the weight of every\npoint in the cloud (*w\u003csub\u003en\u003c/sub\u003e*).  In that case, RMSD is defined as:\n\n\u003cimg src=\"http://latex.codecogs.com/gif.latex?\\large\u0026space;RMSD=\\sqrt{\\left.\\sum_{n=1}^N\\,w_n\\,\\sum_{i=1}^3\\left|X_{ni}-\\left(\\sum_{j=1}^3 c R_{ij}x_{nj}+T_i\\right)\\right|^2\\quad \\middle/ \\quad\\sum_{n=1}^N w_n \\right.}\"/\u003e\n\n### Algorithm\n\nThis function implements a more general variant of the method from this paper:\nR. Diamond, (1988)\n\"A Note on the Rotational Superposition Problem\",\n Acta Cryst. A44, pp. 211-216.\n\n### Scale transformations\n\nThis version has been augmented slightly to support scale transformations.  (I.E. multiplication by scalars.  This can be useful for the registration of two different annotated volumetric 3-D images of the same object taken at different magnifications.)\n\nNote that if you enable scale transformations (i.e. if *allow_rescale=True*), you should be wary if the function returns a negative **c** value.  Negative **c** values correspond to inversions (reflections).  For this reason, if you are using this function to compare the conformations of molecules, you should probably set *allow_rescale=False*.  This will prevent matching a molecule with its stereoenantiomer.\n\n## Installation using pip\n\n    pip install .\n\nLater, you can uninstall superpose3d using:\n\n    pip uninstall superpose3d\n\n## Requirements\n\nsuperpose3d depends on numpy\n\n## License\n\nsuperpose3d is available under the terms of the [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjewettaij%2Fsuperpose3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjewettaij%2Fsuperpose3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjewettaij%2Fsuperpose3d/lists"}