extract a PDB from Gromacs TPR files

Version 1.1.0.0 (4.05 KB) by Evan
Extracts structure data from a Gromacs TPR file and outputs it to PDB format.
335 Downloads
Updated 24 May 2013

View License

%% TPR2PDB.m
%
% Gromacs is useful for simulating all-atom systems, and it initiates these
% simulations with a TPR file. All TPR files contain coordinate data to
% initiate the simulation. Occasionally it is useful to open and check that
% structure. This program extracts it and converts it to PDB format for
% convenient viewing. The information extracted is coordinates, atom type,
% and partial charges. Partial charges are stored in the beta-factor column
% of the output file.
%
%
% ----- Requirements -----
%
% GROMACS
% This program uses the Gromacs command 'GMXdump' to create a text
% file. This avoids any problems that may precipitate from Gromacs
% updates and version changes. Be sure this command is in a valid
% path.
%
% gmxdump
% See above. The command that initiates this file is
% $> gmxdump -s [TPR file] > textForAnalysis.txt
% This program fails if this can't be done properly. Note that this
% is a Unix system command style, and may have issues when run with
% Windows. Use Putty or cygwin wrappers if using Windows. MatLab can
% be initiated from these wrappers.
%
% TPR file
% This is necessary. These are the files used to prepare Gromacs
% simulations.
%
%
% ----- Inputs -----
% TPR file (required)
% intermediate text file (optional, output of GMXdump)
%
%
% ----- Examples -----
% TPR2PDB('3IJU.tpr') % outputs coordinates to '3IJU.pdb'

Cite As

Evan (2024). extract a PDB from Gromacs TPR files (https://www.mathworks.com/matlabcentral/fileexchange/38794-extract-a-pdb-from-gromacs-tpr-files), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Simulation in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Added a patch at lines 96-100 to handle a subtle variation between system configurations.

1.0.0.0