Comments (6)
I have just had a look at the updated version of the lexer compared to one crates.io, looks much better since we should not get index errors causing panics! which is much better :)
from pdbtbx.
I also get this error:
thread 'structure::tests::from_pdbtbx' panicked at 'index out of bounds: the len is 67 but the index is 67', /home/sasa/.cargo/registry/src/github.com-1ecc6299db9ec823/pdbtbx-0.10.1/src/read/pdb/lexer.rs:723:31
After investigating the source code, the DBREF sections appear to be causing this problem.
Please let me know if I am doing something wrong? or is this an issue with the crate?
To me it seems like an issue with the crate, since I am using regular PDB files and following the documentation on how to load them
from pdbtbx.
Interim fix - DELETE the entire header
from pdbtbx.
Any crash is an issue with the crate. I will look into what is causing the issues and see if I can get a fix in. Thanks for opening the issue!
from pdbtbx.
It is a bit of an ugly fix but I lowered the level of the MASTER
record mismatch so that ErrorLevel::Loose
will not panic anymore on these errors. Because that was ultimately all that kept the file from running when I took the original PDB file. I can see you had more reported issues in your first crash, I could not replicate those. If these issues persist please send me the file you run so I can debug what is happening.
A bit of backstory, there are 2207 atoms (1931 ATOM + 276 HETATM of which 244 HOH) in the file but the MASTER record claims there are 2187. I have not yet found the definition which determines the MASTER record number.
As a side project I restructured the whole lexing code so that errors like the second crash are pretty much impossible (there are a handful of cases left out of the hundreds before). So thanks for the push I needed to clean up this code!
Side note: if you want to run the version of pdbtbx with this patch you will have to run it directly from git until a new release is made: pdbtbx = {git = "https://github.com/douweschulte/pdbtbx"}
.
from pdbtbx.
Perfect! If any of the issues pops up again or you find any new ones, please open an issue again. Thanks again for sending it in!
from pdbtbx.
Related Issues (20)
- Support pdbML HOT 2
- Add SASA support HOT 14
- Panic in `save/pdb.rs:517:29` at `Option::unwrap()` on a `None` value HOT 3
- Issues with `remove_models_except` implementation HOT 2
- Crates.io new version Request HOT 1
- Bad handling of PDB files containing mixed upper and lower case chains HOT 3
- Maybe make a Discord? HOT 2
- Bad Models in PDB HOT 1
- ReadOptions
- Utilities? HOT 6
- REMARK Line Length Enforcement HOT 2
- Fall back strategy for headerless PDB files. HOT 2
- Read option to only parse `ATOM` records HOT 5
- Finish implementing the `ReadOptions`
- Possible bug parsing H atoms on nucleic structure HOT 6
- mmCIF parser has column requirements not in line with mmCIF specification HOT 3
- mmCIF format, atoms addressable only via label_* fields and not via auth_* fields HOT 6
- Panic while parsing HOT 3
- Allow for the use of compressed files HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdbtbx.