-
Notifications
You must be signed in to change notification settings - Fork 20
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
Customize StrictnessLevel
#127
Comments
There currently is not. But with PR #126 more fine grained control is added to the opening of files, if something like this is useful we could think about a way of allowing control here. The point of invalidation errors though is that I found them to be so bad I could not unambiguously parse the file, this judgement is just my own though so changes can be made. Maybe the easiest way would be to add a strictnesslevel in between two already present and allow some of the warnings there. Or potentially if we want to go the full control via |
I think that this is possible, we could potentially change how we use the strictness level, and make it work more like a bitfield options approach that you'd use in C/C++. I'm not sure how idiomatic bitfields are in Rust, I think fine for internal usage? The idea would be that we keep the current StrictnessLevels, but make it so that that type actually sits on top of a bitfield which controls which types of errors are raised. So the current levels will have certain default bits set, but we also then expose an API for constructing custom StrictnessLevels, where in some contexts people want certain checks but not others. The next thing I wanted to ask, is would it make sense to have it so that PDBTBX can automatically fix simple issues with PDBs? We could have that as a setting on the new |
Bitfields do not have built in support but there are crates for it. Keeping it internal sounds good. I like the sound of |
My lab has a PDB fixing script in python which performs lots of corrections for PDB files, it might be interesting to add some of them to PDBTBX? Again, I think this comes down to what do we want from PDBTBX? I think that this is also potential feature creep (I know I am the one who suggested the |
I do think that having PDB validation and fixing tools would make sense for this crate, but it might be a good idea to add them behind a feature flag, depending on how much code it takes. |
+1 for |
I will checkout a branch to have a look at implementing it. @rvhonorato are you able to give me a list of which checks you care most about and want changing? |
I am currently blocked by #126 since I will need to use what this adds. |
The ones I've found more frequently are:
|
I'm using pdbtbx to validate input PDBs in our new frontend via wasm.
While implementing it I've came acrross the
StrictnessLevel
which is a nice way to be more or less permissive in the format. For our application in specific, some of the things that are marked asInvalidatingError
can actually be handled by the molecular engine (CNS).Before I write something to automatically fix these so that they pass the pdbtbx validation I think its best to ask first if; is there a way to customize the strictness to allow for certain errors?
The text was updated successfully, but these errors were encountered: