Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructured pdb reader and added alpha carbon argument #114

Merged
merged 4 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
pwd
which python
conda info
- run: pip install .
- run: which calculate_rmsd
- run: |
make test python=python
- run: |
Expand Down
9 changes: 1 addition & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@ repos:
hooks:
- id: isort
name: sorts imports
args: [
# Align isort with black formatting
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=99",
]
args: ["--profile", "black", "--filter-files", "--line-width=99"]


- repo: https://github.com/psf/black
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ format:
${python} -m pre_commit run --all-files

test:
${python} -m pytest -rs ./tests
${python} -m pytest ./tests

test-dist:
${python} -m twine check dist/*
Expand Down
23 changes: 7 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ Hungarian_ (default), distance (very approximate) and brute force (slow).
calculate_rmsd --reorder tests/water_16.xyz tests/water_16_idx.xyz


It is also possible to use RMSD as a library in other scripts, see `example.py` for example usage.
It is also possible to use RMSD as a library in other scripts, see
``example.py`` and ``tests/*`` for example usage.


Problems?
Expand All @@ -120,21 +121,11 @@ Problems?
Submit issues or pull requests on GitHub.


Contributions
A note on PDB
-------------

Please note that we are using ``black`` with line length of 99. Easiest way to
abide to the code standard is to install the following package.
Protein Data Bank format (PDB) is column-based; however, countless examples of non-standard ``.pdb`` files exist.
We try to read them, but if you have trouble reading the file, check if the file format is compliant with PDB.
For example, some hydrogens are noted as ``HG11``, which we assume is not mercury.

.. code-block:: bash

pip install pre-commit

and run the following command in your repository

.. code-block:: bash

pre-commit install

This will install a hook in your git and re-format your code to adhere to the standard.
As well as check for code quality.
- https://www.wwpdb.org/documentation/file-format-content/format33/sect9.html#ATOM
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ Homepage = "https://github.com/charnley/rmsd"
[options.packages.find]
where="."

[project.scripts]
calculate_rmsd = "rmsd.calculate_rmsd:main"

[tool.setuptools]
include-package-data = true

[tool.setuptools.dynamic]
version = {attr = "rmsd.__version__"}
version = {attr = "rmsd.version.__version__"}
Loading
Loading