Bsoft 2.1.4
Bernard's software package
rwPDB.cpp File Reference

Library routines to read and write PDB coordinate files. More...

#include "rwPDB.h"
#include "Matrix.h"
#include "linked_list.h"
#include "utilities.h"
#include <fstream>

Functions

int readPDB (Bstring &filename, Bmolgroup *molgroup)
 Reads a PDB format coordinate file. More...
 
int writePDB (Bstring &filename, Bmolgroup *molgroup)
 Writes a PDB format coordinate file. More...
 

Variables

int verbose
 

Detailed Description

Library routines to read and write PDB coordinate files.

Author
Bernard Heymann
Date
Created: 19980822
Modified: 20110623

Function Documentation

◆ readPDB()

int readPDB ( Bstring filename,
Bmolgroup molgroup 
)

Reads a PDB format coordinate file.

Parameters
&filenamecoordinate file name.
*molgroupmolecule group.
Returns
int number of molecules read (<0 if reading failed).
PDB fixed format:
01234567890123456789012345678901234567890123456789012345678901234567890
ATOM      1  N   ASP     1     -45.145   1.941 -34.322  1.00  0.00
ATOM      2  OD2 ASP     1     -44.830   3.862 -30.017  1.00  0.00
ATOM      3  OD1 ASP     1     -45.547   1.817 -29.798  1.00  0.00

◆ writePDB()

int writePDB ( Bstring filename,
Bmolgroup molgroup 
)

Writes a PDB format coordinate file.

Parameters
&filenamecoordinate file name.
*molgroupmolecule group.
Returns
int number of molecules written (<0 if writing failed).
PDB fixed format:
01234567890123456789012345678901234567890123456789012345678901234567890
ATOM      1  N   ASP     1     -45.145   1.941 -34.322  1.00  0.00
ATOM      2  OD2 ASP     1     -44.830   3.862 -30.017  1.00  0.00
ATOM      3  OD1 ASP     1     -45.547   1.817 -29.798  1.00  0.00

Variable Documentation

◆ verbose

int verbose
extern