-
Notifications
You must be signed in to change notification settings - Fork 103
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
Multi-model PDB takes b_factor
from first model
#449
Comments
Thanks for bringing this up. I fear this is a limitation in the core of Biotite: I see two future prospects to fix this:
A solution to this, that is equivalent to variant 1 but with lower efficiency, would be parsing each model separately and saving the array of B-factors: file = pdb.PDBFile.read(
"/home/kunzmann/data/coding/biotite/tests/structure/data/1l2y.pdb"
)
b_factor = []
for model in range(file.get_model_count()):
atoms = file.get_structure(model=model+1, extra_fields=["b_factor"])
b_factor.append(atoms.b_factor)
b_factor = np.stack(b_factor) I tend to variant 1, as the B-factor is originally a property of crystal structures (although it has been exploited by a range of programs to store other data as well). As crystal structures in almost all cases have only a single model and multi-model (e.g. NMR) structures have no meaningful B-factor, there is little use for different B-factors along multiple models. Therefore, I think handling a 2D array of B-factors separate from the What is your opinion on this? Would using a separate 2D array work for your use case of atom coloring on a per-model basis? |
In my experience the only time a multi-model PDB or mmCIF contains differing For my own purposes, handling a separate 2D array would be totally fin. I can index it when creating the models, and I currently only need to actually have access to it one time really. The code solution you posted as well would also be useful and I could certainly implement it in the mean time if you were to plan on adding the |
When importing a multi-model
pdb
file, theb_factor
is taken from the first model, for all subsequent models.Example pdb:
Each frame outputs
array([0.17, 0.17, 0.17])
from the first model.The text was updated successfully, but these errors were encountered: