-
Notifications
You must be signed in to change notification settings - Fork 663
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
Formal charge 1 is unrecognized #4027
Comments
We can probably loosen up the checks to not throw a value error but just not recognise the charge for that entry and throw a warning. I would suggest we don't try to add a check for this formal charge case and bend reading so that it supports nonstandard PDB formats just because charmm-gui couldn't get it right though. |
I'm not really after the charge information (and agree they should be instead stick to the standards, which exist for a reason). A more relaxed check that just says |
@BradyAJohnston it would also be good to tell CHARMM-GUI that their PDB format violates PDB standard for ATOM records
Perhaps @wonpil can be convinced to look into fixing it there? |
On behalf of CHARMM-GUI, I am looking into this. Since we use CHARMM to write all of our PDB files, I will probably just have to forward the case to the CHARMM developers, but perhaps I can at least fix PDB files in our archives, if you tell me which ones you found that provide element + charge info (so far, all of the ones I've looked at use the format described below). I would generally caution against reading topology info from CHARMM-GUI's PDB files, because the PDB format does not allow enough space for many of our residue names. Instead, we always read either PSF+PDB or PSF+CRD. Almost all PDB files provided by CHARMM-GUI use CHARMM PDB format, not the official format, in which the most obvious changes are:
CHARMM supposedly allows writing "official" PDB format, but in a quick test I performed just now, it seems that the option merely adds back the chain column, and still writes the segment ID in columns 73+. I'll let the CHARMM developers know that and hopefully get a fixed version soon. |
Thanks for the explanation @nk53 . In particular the reminder that not everything that says “PDB” is a RCSB PDB. |
@nk53 the description of the format is very useful. Is there a full description anywhere? This would help a lot in supporting this format. |
Unfortunately, the CHARMM documentation is often incomplete and outdated. The only reliable definitions are in the (fortran) source code. If you have a copy of it (free for academic use), you can find the relevant code in
|
The charge from some PDB files is not recognised. Testing with PDB files from CHARMM-GUI that have their charges specified in a slightly different format cannot be parsed.
While I believe the 'official' way to specify charges is
1+
or1-
(which MDAnalysis reads), these PDB files have either1
or-1
which gets the error :Minimum file that DOESN'T work:
Minimum file that DOES work:
This breaks at the parsing stage for
mda.Universe(file)
.Both of the files can be parsed successfully in version
2.2.0
, but2.3.0
+ introduced the formal charge parsing for the.pdb
files which now breaks the import.I am unsure if this is something that MDAnalysis would formally support, but if not, any suggestions for a fix that I could include in Molecular Nodes so I can bump the MDAnalysis version from
2.2.0
would be very much appreciated.The text was updated successfully, but these errors were encountered: