Replies: 1 comment 2 replies
-
After musing on the solutions outlined in #50, I think I would favour functionality like:
Which adds a This then enables users to quickly grab the correct selection of atoms using normal pandas selections eg something like: df = df.df["ATOM"]
model_1 = df.loc[df["model"] == 1] this could then be wrapped in a more general method like: from biopandas.pdb import PandasPdb
df = PandasPdb.read_pdb("path/to/structure.pdb")
model_1 = df.get_model(index=3) Where |
Beta Was this translation helpful? Give feedback.
2 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hi @rasbt!
I'm not sure if this is a missing feature (or if I'm being silly!) but I don't see that PDB files containing multiple models (eg. 2jyf) denote the start and end of each model in the PDB file. Granted this is an RNA structure but it is parsed just fine otherwise. It would be nice to add another column to the dataframe (or as another entry in the PandasPDB object) denoting which model each atom in the main coordinate text belongs to.
EDIT:
Ah, I just spotted you're already aware #50
Beta Was this translation helpful? Give feedback.
All reactions