atom select over trajectory
Issue #210
resolved
Hello,
Currently is there any way to select a group of atoms from a dcd file and extract their xyz coordinates?
For example say if I want to plot the movement of a ligand through the trajectory, would there be any way to explicitly preform this in bio3d or must I use vmd to created a dcd file of only the ligand.
Best, Daniel Moore
Comments (4)
-
-
Thanks for the quick reply.
This is fantastic. Its great to see a package being actively developed for protein/trajectory analysis for R.
Best, Daniel Moore
-
- changed status to resolved
-
- changed version to v2.2
- Log in to comment
Hi Daniel,
Yes, bio3d provides the function atom.select for the various types of atom selections. Before doing it, you need a PDB file that is corresponding to the simulation trajectory at hand (i.e. having the same number of atoms stored in the same order). Then, perform atom selection on the PDB and use the returned indices to fetch data from DCD. For example, see following simple code snippet:
Check out 'help(atom.select)' for more details. Let me know if you still have any question!