<p>Check out gmx_trjconv - this command is in GROMACS and accepts several options where you can specify the specific single frame that you want to output/write - out to the new pdb/gro/xtc file.  <a href="https://manual.gromacs.org/current/onlinehelp/gmx-trjconv.html" rel="nofollow noreferrer">https://manual.gromacs.org/current/onlinehelp/gmx-trjconv.html</a></p>

CC BY-SA 4.0
2022-12-28T18:58:07.987Z
2022-12-28T18:58:07.987Z
Guy Francis Mongelli
<p>How can I do to extract a single frame as a pdb file from a trajectory traj.xtc file, by using MDAnalysis?</p>
<p>I've got a universe
u=mda.Universe('confout.gro','traj.xtc')</p>
<p>Then I selected a residue by doing select_atoms, and I would like to extract a single frame as a pdb file</p>

CC BY-SA 4.0
2022-07-22T12:57:43.550Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
CC BY-SA 4.0
2022-08-01T10:24:40.273Z
Q to more involved folk in admin: why was Community bot was invoked for this, as it was a case of nobody bothering to answer because it is a boring 'please link me to command X in the documentation' request. I.e. https://docs.mdanalysis.org/stable/documentation_pages/coordinates/init.html#writers
Matteo Ferla
<python><pdb><gromacs>
Extract single frame with MDAnalysis
# Extract single frame with MDAnalysis

(Asked by: username_0 on 2022-07-22)

How can I do to extract a single frame as a pdb file from a trajectory traj.xtc file, by using MDAnalysis?

I've got a universe
u=mda.Universe('confout.gro','traj.xtc')

Then I selected a residue by doing select\_atoms, and I would like to extract a single frame as a pdb file

**Tags:** python, pdb, gromacs
> **Comments:**
> **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
> **username_2**: Q to more involved folk in admin: why was Community bot was invoked for this, as it was a case of nobody bothering to answer because it is a boring 'please link me to command X in the documentation' request. I.e. https://docs.mdanalysis.org/stable/documentation_pages/coordinates/init.html#writers  

---

## 1 answers

### Answer by username_3 on 2022-12-28. Score: 1

Check out gmx\_trjconv - this command is in GROMACS and accepts several options where you can specify the specific single frame that you want to output/write - out to the new pdb/gro/xtc file. <https://manual.gromacs.org/current/onlinehelp/gmx-trjconv.html>


---

