avogadrolibs
avogadrolibs copied to clipboard
Enhance PDB File Import to Support Trajectory Data in Avogadro
Pull Request #1524
This PR updates pdbformat.cpp
to improve the handling of PDB trajectories, aligning with community guidelines for file processing without integrating GUI elements. Key enhancements include:
-
Frame Separation with ENDMDL: Implements detection of
ENDMDL
to identify and separate frames within PDB trajectories, enabling accurate animation and analysis of sequential models. -
Frame Position Storage: Accumulates atomic positions per frame until
ENDMDL
, then stores these as distinct frames in the molecule, facilitating correct trajectory visualization. -
Final Frame Processing: Ensures the last set of positions is added as a frame, improving robustness in handling diverse PDB files.
Closes #1524.
Thanks for opening this pull request! Please check out our contributing guidelines and check for the automated tests.