pidibble 1.1.8__tar.gz → 1.2.0__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.1.8 → pidibble-1.2.0}/PKG-INFO +5 -1
- {pidibble-1.1.8 → pidibble-1.2.0}/README.md +4 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/hex.py +5 -1
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/pdbparse.py +6 -1
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/resources/pdb_format.yaml +18 -18
- {pidibble-1.1.8 → pidibble-1.2.0}/pyproject.toml +1 -1
- {pidibble-1.1.8 → pidibble-1.2.0}/.gitignore +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/.readthedocs.yaml +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/LICENSE +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/MANIFEST.in +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/Makefile +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/make.bat +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/requirements.txt +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/source/api.rst +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/source/conf.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/source/generated/pidibble.rst +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/source/index.rst +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/source/notes.md +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/docs/source/usage.rst +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/__init__.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/baseparsers.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/baserecord.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/mmcif_parse.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/pdbrecord.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/resources/__init__.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/pidibble/resources/mmcif_format.yaml +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/__init__.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/conftest.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_hex/my_system.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_hex.py +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/4tvp.cif +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/4tvp.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/4zmj-newresnames.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/4zmj.cif +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/4zmj.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/6m0j.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/G.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/GG.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/test.pdb +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb/test_pdb_format.yaml +0 -0
- {pidibble-1.1.8 → pidibble-1.2.0}/tests/unit/test_rcsb.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pidibble
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
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,10 @@ ATOM
|
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
## Release History
|
|
91
|
+
* 1.2.0
|
|
92
|
+
* bugfix: hex issues again
|
|
93
|
+
* 1.1.9
|
|
94
|
+
* gently handles any nan values or '*' fillers
|
|
91
95
|
* 1.1.8
|
|
92
96
|
* Allow unstructured REMARK records (thanks a lot, packmol) to be parsed as REMARK.-1
|
|
93
97
|
* 1.1.6
|
|
@@ -2,8 +2,12 @@ __hex_tripped__=False
|
|
|
2
2
|
def str2atomSerial(arg):
|
|
3
3
|
global __hex_tripped__
|
|
4
4
|
assert type(arg)==str
|
|
5
|
-
if
|
|
5
|
+
if arg=='nan':
|
|
6
|
+
return_object=0
|
|
7
|
+
elif __hex_tripped__ or any([(x in arg) for x in 'abcdef']):
|
|
6
8
|
return_object=int(arg,16)
|
|
9
|
+
elif '*' in arg:
|
|
10
|
+
return_object=0
|
|
7
11
|
else:
|
|
8
12
|
return_object=int(arg)
|
|
9
13
|
if return_object>99999 and not __hex_tripped__:
|
|
@@ -23,6 +23,11 @@ import importlib.metadata
|
|
|
23
23
|
import json
|
|
24
24
|
from .hex import str2atomSerial, hex_reset
|
|
25
25
|
|
|
26
|
+
def safe_float(x):
|
|
27
|
+
if x=='nan':
|
|
28
|
+
return 0.0
|
|
29
|
+
return float(x)
|
|
30
|
+
|
|
26
31
|
__version__ = importlib.metadata.version("pidibble")
|
|
27
32
|
|
|
28
33
|
def str2int_sig(arg):
|
|
@@ -31,7 +36,7 @@ def str2int_sig(arg):
|
|
|
31
36
|
|
|
32
37
|
class PDBParser:
|
|
33
38
|
# mappers={'Integer':int,'String':str,'Float':float}
|
|
34
|
-
mappers={'HxInteger':str2atomSerial,'Integer':str2int_sig,'String':str,'Float':
|
|
39
|
+
mappers={'HxInteger':str2atomSerial,'Integer':str2int_sig,'String':str,'Float':safe_float}
|
|
35
40
|
mappers.update(ListParsers)
|
|
36
41
|
comment_lines=[]
|
|
37
42
|
comment_chars=['#']
|
|
@@ -23,17 +23,17 @@ custom_formats:
|
|
|
23
23
|
Residue10:
|
|
24
24
|
resName: [String,[1,4]]
|
|
25
25
|
chainID: [String,[5,5]]
|
|
26
|
-
seqNum: [
|
|
26
|
+
seqNum: [Integer,[6,9]]
|
|
27
27
|
iCode: [String,[10,10]]
|
|
28
28
|
Residue11:
|
|
29
29
|
resName: [String,[1,4]]
|
|
30
30
|
chainID: [String,[5,5]]
|
|
31
|
-
seqNum: [
|
|
31
|
+
seqNum: [Integer,[7,10]]
|
|
32
32
|
iCode: [String,[11,11]]
|
|
33
33
|
Residue12:
|
|
34
34
|
resName: [String,[1,4]]
|
|
35
35
|
chainID: [String,[5,5]]
|
|
36
|
-
seqNum: [
|
|
36
|
+
seqNum: [Integer,[7,11]]
|
|
37
37
|
iCode: [String,[12,12]]
|
|
38
38
|
Biomtrow:
|
|
39
39
|
m1: [Float,[1,10]]
|
|
@@ -85,16 +85,16 @@ record_formats:
|
|
|
85
85
|
type: 1
|
|
86
86
|
fields:
|
|
87
87
|
numRemark: [Integer,[11,15]]
|
|
88
|
-
numHet: [
|
|
88
|
+
numHet: [Integer,[21,25]]
|
|
89
89
|
numHelix: [Integer,[26,30]]
|
|
90
90
|
numSheet: [Integer,[31,35]]
|
|
91
91
|
numTurn: [Integer,[36,40]]
|
|
92
92
|
numSite: [Integer,[41,45]]
|
|
93
93
|
numXform: [Integer,[46,50]]
|
|
94
|
-
numCoord: [
|
|
94
|
+
numCoord: [Integer,[51,55]]
|
|
95
95
|
numTer: [Integer,[56,60]]
|
|
96
|
-
numConect: [
|
|
97
|
-
numSeq: [
|
|
96
|
+
numConect: [Integer,[61,65]]
|
|
97
|
+
numSeq: [Integer,[66,70]]
|
|
98
98
|
ORIGX1:
|
|
99
99
|
type: 1
|
|
100
100
|
fields:
|
|
@@ -350,7 +350,7 @@ record_formats:
|
|
|
350
350
|
CISPEP:
|
|
351
351
|
type: 3
|
|
352
352
|
fields:
|
|
353
|
-
serNum: [
|
|
353
|
+
serNum: [Integer,[8,10]]
|
|
354
354
|
residue1: [Residue11,[12,22]]
|
|
355
355
|
residue2: [Residue11,[26,36]]
|
|
356
356
|
modNum: [Integer,[44,46]]
|
|
@@ -374,24 +374,24 @@ record_formats:
|
|
|
374
374
|
fields:
|
|
375
375
|
idCode: [String,[8,11]]
|
|
376
376
|
chainID: [String,[13,13]]
|
|
377
|
-
seqBegin: [
|
|
377
|
+
seqBegin: [Integer,[15,18]]
|
|
378
378
|
insertBegin: [String,[19,19]]
|
|
379
|
-
seqEnd: [
|
|
379
|
+
seqEnd: [Integer,[21,24]]
|
|
380
380
|
insertEnd: [String,[25,25]]
|
|
381
381
|
database: [String,[27,32]]
|
|
382
382
|
dbAccession: [String,[34,41]]
|
|
383
383
|
dbIdCode: [String,[43,54]]
|
|
384
|
-
dbseqBegin: [
|
|
384
|
+
dbseqBegin: [Integer,[56,60]]
|
|
385
385
|
dbinsBegin: [String,[61,61]]
|
|
386
|
-
dbseqEnd: [
|
|
386
|
+
dbseqEnd: [Integer,[63,67]]
|
|
387
387
|
dbinsEnd: [String,[68,68]]
|
|
388
388
|
DBREF1:
|
|
389
389
|
fields:
|
|
390
390
|
idCode: [String,[8,11]]
|
|
391
391
|
chainID: [String,[13,13]]
|
|
392
|
-
seqBegin: [
|
|
392
|
+
seqBegin: [Integer,[15,18]]
|
|
393
393
|
insertBegin: [String,[19,19]]
|
|
394
|
-
seqEnd: [
|
|
394
|
+
seqEnd: [Integer,[21,24]]
|
|
395
395
|
insertEnd: [String,[25,25]]
|
|
396
396
|
database: [String,[27,32]]
|
|
397
397
|
dbIdCode: [String,[48,67]]
|
|
@@ -400,12 +400,12 @@ record_formats:
|
|
|
400
400
|
idCode: [String,[8,11]]
|
|
401
401
|
chainID: [String,[13,13]]
|
|
402
402
|
dbAccession: [String,[19,40]]
|
|
403
|
-
seqBegin: [
|
|
404
|
-
seqEnd: [
|
|
403
|
+
seqBegin: [Integer,[46,55]]
|
|
404
|
+
seqEnd: [Integer,[58,67]]
|
|
405
405
|
HELIX:
|
|
406
406
|
type: 3
|
|
407
407
|
fields:
|
|
408
|
-
serNum: [
|
|
408
|
+
serNum: [nteger,[8,10]]
|
|
409
409
|
helixID: [String,[12,14]]
|
|
410
410
|
initRes: [Residue11,[16,26]]
|
|
411
411
|
endRes: [Residue11,[28,38]]
|
|
@@ -846,7 +846,7 @@ record_formats:
|
|
|
846
846
|
modelNum: [Integer,[13,14]]
|
|
847
847
|
resName: [String,[16,18]]
|
|
848
848
|
chainID: [String,[20,20]]
|
|
849
|
-
seqNum: [
|
|
849
|
+
seqNum: [Integer,[22,26]]
|
|
850
850
|
iCode: [String,[27,27]]
|
|
851
851
|
470:
|
|
852
852
|
fields:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|