pidibble 1.2.0__tar.gz → 1.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pidibble-1.3.1/.github/workflows/release.yaml +41 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/PKG-INFO +4 -2
- {pidibble-1.2.0 → pidibble-1.3.1}/README.md +2 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/source/conf.py +2 -2
- pidibble-1.3.1/docs/source/generated/pidibble.rst +6 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/source/usage.rst +3 -1
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/hex.py +1 -1
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/mmcif_parse.py +9 -2
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/resources/mmcif_format.yaml +16 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/resources/pdb_format.yaml +1 -1
- {pidibble-1.2.0 → pidibble-1.3.1}/pyproject.toml +1 -1
- pidibble-1.3.1/tests/unit/test_rcsb/8fae.cif +23794 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb.py +21 -1
- pidibble-1.2.0/docs/source/generated/pidibble.rst +0 -23
- {pidibble-1.2.0 → pidibble-1.3.1}/.gitignore +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/.readthedocs.yaml +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/LICENSE +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/MANIFEST.in +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/Makefile +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/make.bat +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/requirements.txt +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/source/api.rst +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/source/index.rst +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/docs/source/notes.md +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/__init__.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/baseparsers.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/baserecord.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/pdbparse.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/pdbrecord.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/pidibble/resources/__init__.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/__init__.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/conftest.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_hex/my_system.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_hex.py +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/4tvp.cif +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/4tvp.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/4zmj-newresnames.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/4zmj.cif +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/4zmj.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/6m0j.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/G.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/GG.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/test.pdb +0 -0
- {pidibble-1.2.0 → pidibble-1.3.1}/tests/unit/test_rcsb/test_pdb_format.yaml +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Release & Upload to PyPI (Hatch)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
release:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout code
|
|
14
|
+
uses: actions/checkout@v3
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v4
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.9"
|
|
20
|
+
|
|
21
|
+
- name: Install Hatch
|
|
22
|
+
run: python -m pip install --upgrade pip hatch
|
|
23
|
+
|
|
24
|
+
- name: Clean previous builds
|
|
25
|
+
run: rm -rf dist/
|
|
26
|
+
|
|
27
|
+
- name: Build the package with Hatch
|
|
28
|
+
run: hatch build
|
|
29
|
+
|
|
30
|
+
- name: Upload to GitHub Release
|
|
31
|
+
uses: softprops/action-gh-release@v1
|
|
32
|
+
with:
|
|
33
|
+
files: |
|
|
34
|
+
dist/*.tar.gz
|
|
35
|
+
dist/*.whl
|
|
36
|
+
|
|
37
|
+
- name: Publish to PyPI using Hatch
|
|
38
|
+
env:
|
|
39
|
+
HATCH_INDEX_USER: __token__
|
|
40
|
+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }}
|
|
41
|
+
run: hatch publish
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pidibble
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: A complete Protein Data Bank (PDB) file parser
|
|
5
5
|
Project-URL: Source, https://github.com/cameronabrams/pidibble
|
|
6
6
|
Project-URL: Documentation, https://pidibble.readthedocs.io/en/latest/
|
|
@@ -88,6 +88,8 @@ ATOM
|
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
## Release History
|
|
91
|
+
* 1.2.1:
|
|
92
|
+
* bugfix: hex issues AGAIN
|
|
91
93
|
* 1.2.0
|
|
92
94
|
* bugfix: hex issues again
|
|
93
95
|
* 1.1.9
|
|
@@ -175,4 +175,6 @@ Currently, only ``ATOM``, ``HETATM``, ``SEQADV``, ``REMARK 350``, and ``REMARK 4
|
|
|
175
175
|
>>> ', '.join(list(p.parsed.keys()))
|
|
176
176
|
'ATOM, HETATM, LINK, SSBOND, SEQADV, REMARK.350.BIOMOLECULE1.TRANSFORM1, REMARK.350.BIOMOLECULE1.TRANSFORM2, REMARK.350.BIOMOLECULE1.TRANSFORM3, REMARK.465'
|
|
177
177
|
|
|
178
|
-
These records are the bare minimum needed to generate (say) input coordinate and topology files for an MD simulation. Future versions of ``pidibble`` will provide complete PDB-like parsings of ``mmCIF`` files. This is probably not useful.
|
|
178
|
+
These records are the bare minimum needed to generate (say) input coordinate and topology files for an MD simulation. Future versions of ``pidibble`` will provide complete PDB-like parsings of ``mmCIF`` files. This is probably not useful.
|
|
179
|
+
|
|
180
|
+
Importantly: ``pidibble`` parses mmCIF input to generate a structure that is the equivalent of the PDB format; that is, it uses ``auth`` fields instead of ``label`` fields.
|
|
@@ -4,7 +4,7 @@ def str2atomSerial(arg):
|
|
|
4
4
|
assert type(arg)==str
|
|
5
5
|
if arg=='nan':
|
|
6
6
|
return_object=0
|
|
7
|
-
elif __hex_tripped__ or any([(x in arg) for x in '
|
|
7
|
+
elif __hex_tripped__ or any([(x in arg) for x in 'abcdefABCDEF']):
|
|
8
8
|
return_object=int(arg,16)
|
|
9
9
|
elif '*' in arg:
|
|
10
10
|
return_object=0
|
|
@@ -101,8 +101,15 @@ class MMCIF_Parser:
|
|
|
101
101
|
if k in map_values:
|
|
102
102
|
mapper=self.global_maps[map_values[k]]
|
|
103
103
|
if type(val)==list:
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
logger.debug(f'mapper {mapper}')
|
|
105
|
+
logger.debug(f'list before mapping {val}')
|
|
106
|
+
mapped_val=list(set([str(mapper[x]) for x in val]))
|
|
107
|
+
logger.debug(f'list after mapping {mapped_val}')
|
|
108
|
+
try:
|
|
109
|
+
mapped_val.sort()
|
|
110
|
+
val=mapped_val
|
|
111
|
+
except:
|
|
112
|
+
raise TypeError(f'could not sort list {mapped_val} at key {k}')
|
|
106
113
|
else:
|
|
107
114
|
val=mapper[val]
|
|
108
115
|
idict[k]=val
|
|
@@ -74,6 +74,10 @@ LINK:
|
|
|
74
74
|
resName: ptnr1_auth_comp_id
|
|
75
75
|
seqNum: ptnr1_auth_seq_id
|
|
76
76
|
iCode: pdbx_ptnr1_PDB_ins_code
|
|
77
|
+
residue1_label:
|
|
78
|
+
chainID: ptnr1_label_asym_id
|
|
79
|
+
resName: ptnr1_label_comp_id
|
|
80
|
+
seqNum: ptnr1_label_seq_id
|
|
77
81
|
ptnr1_label_atom_id: ptnr1_label_atom_id
|
|
78
82
|
ptnr1_label_comp_id: ptnr1_label_comp_id
|
|
79
83
|
ptnr1_label_asym_id: ptnr1_label_asym_id
|
|
@@ -85,6 +89,10 @@ LINK:
|
|
|
85
89
|
resName: ptnr2_auth_comp_id
|
|
86
90
|
seqNum: ptnr2_auth_seq_id
|
|
87
91
|
iCode: pdbx_ptnr2_PDB_ins_code
|
|
92
|
+
residue2_label:
|
|
93
|
+
chainID: ptnr2_label_asym_id
|
|
94
|
+
resName: ptnr2_label_comp_id
|
|
95
|
+
seqNum: ptnr2_label_seq_id
|
|
88
96
|
ptnr2_label_atom_id: ptnr2_label_atom_id
|
|
89
97
|
ptnr2_label_comp_id: ptnr2_label_comp_id
|
|
90
98
|
ptnr2_label_asym_id: ptnr2_label_asym_id
|
|
@@ -103,6 +111,10 @@ SSBOND:
|
|
|
103
111
|
resName: ptnr1_auth_comp_id
|
|
104
112
|
seqNum: ptnr1_auth_seq_id
|
|
105
113
|
iCode: pdbx_ptnr1_PDB_ins_code
|
|
114
|
+
residue1_label:
|
|
115
|
+
chainID: ptnr1_label_asym_id
|
|
116
|
+
resName: ptnr1_label_comp_id
|
|
117
|
+
seqNum: ptnr1_label_seq_id
|
|
106
118
|
ptnr1_label_atom_id: ptnr1_label_atom_id
|
|
107
119
|
ptnr1_label_comp_id: ptnr1_label_comp_id
|
|
108
120
|
ptnr1_label_asym_id: ptnr1_label_asym_id
|
|
@@ -112,6 +124,10 @@ SSBOND:
|
|
|
112
124
|
resName: ptnr2_auth_comp_id
|
|
113
125
|
seqNum: ptnr2_auth_seq_id
|
|
114
126
|
iCode: pdbx_ptnr2_PDB_ins_code
|
|
127
|
+
residue2_label:
|
|
128
|
+
chainID: ptnr2_label_asym_id
|
|
129
|
+
resName: ptnr2_label_comp_id
|
|
130
|
+
seqNum: ptnr2_label_seq_id
|
|
115
131
|
ptnr2_label_atom_id: ptnr2_label_atom_id
|
|
116
132
|
ptnr2_label_comp_id: ptnr2_label_comp_id
|
|
117
133
|
ptnr2_label_asym_id: ptnr2_label_asym_id
|