Comments (5)
@BradenDKelly I encountered the problem a few weeks ago. This happens because iodata
first tries to identify the element (and atomic numbers) from columns 77-78 which is empty in your PDB (it is common for PDB files not to have this common apparently, but all the ones we tested with had this column). If not available, iodata
using the atom name (columns 13-16) to identify the element by grabbing its first element. So, it wrongly interprets the CL15
atom name as a C
atom. See See Overview of ATOM records.
I am not sure what is a quick fix, because we might have CD
atom name in a protein, which should be interpreted as C
element, but what if we have a Cadmium atom in a PDB (which would have a CD
atom name as well, if I am not wrong).
from iodata.
I'll make a PR for this. There is some unrelated work for the PR to pass, which takes some cleaning.
from iodata.
My two cents: it's an easy fix so we should support it.
from iodata.
It is a surprising little problem that is not as easy to fix as it seems. It is unfortunate that often the last column is not present. In many ways that voids warranty. Because of the conundrum of proteins and other elements sharing the same abbrev, it makes it very difficult. Part of me certainly leans towards some kind of warning if that last column is missing with a note for the user sayimg to check it out... Kind of like how force field generating software will almost always give you parameters but sometimes the fineprint lets you know the parameters are probably better to use as random number generator seeds than as spring constants or torsion barriers.
from iodata.
@FarnazH To come back to this: the columns 13-16 do not necessarily say which element it is, e.g. CA
can be alpha carbon, not Calcium, CD
can be delta carbon, not Cadmium. There may also be weird things like XY
etc. The element should be put in columns 77-78. Programs that don't follow these conventions are essentially broken. #284 fixes this as much as is reasonably possible, but there is no perfect way of dealing with broken files. I'm going to include a warning when the load function does this kind of guesswork, so users know that they should be careful, despite the fact that we try to make the best possible guess.
from iodata.
Related Issues (20)
- Compute electronic energy/gradient(force) in IOData
- Input writers for other quantum chemistry software HOT 2
- Install issue on Windows HOT 2
- Can I trust IOData for handling molden files generated from PySCF HOT 2
- Rename some fields read from PDB, to be more in line with PDB conventions HOT 3
- AttributeError: module 'numpy' has no attribute 'int'
- Scipy Factorial2 change HOT 4
- Issues related to factorial2 function HOT 2
- Can't install on macos with M1 HOT 3
- Computing Center of Mass HOT 3
- Support GPAW HOT 2
- Python 3.9 Numpy 1.20 Depreciation: np.int, np.float HOT 7
- Fix Factorial2 HOT 4
- Switch to more modern project structure with GitHub Actions HOT 5
- NumPy 2 compatibility
- fchk to FCIDUMP (with gbasis) HOT 5
- JSON QCSchema update HOT 1
- Runtime Type check bug in utils.py HOT 6
- Rename functions in `iodata.formats` submodules (?)
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 iodata.