4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Good ROcking Metal Altar for Chronical Sinners
33 static char *SRCID_pdbio_h = "$Id$";
40 #ident "@(#) pdbio.h 1.12 7/28/97"
41 #endif /* HAVE_IDENT */
46 /* THE pdb format (for ATOM/HETATOM lines) */
47 static char *pdbformat ="%-6s%5u %-4.4s%3.3s %c%4d %8.3f%8.3f%8.3f";
48 static char *pdbformat4="%-6s%5u %-4.4s %3.3s %c%4d %8.3f%8.3f%8.3f";
50 /* Enumerated type for pdb records. The other entries are ignored
51 * when reading a pdb file
53 enum { epdbATOM, epdbHETATM, epdbANISOU, epdbCRYST1, epdbCOMPND,
54 epdbMODEL, epdbENDMDL, epdbTER, epdbHEADER, epdbTITLE, epdbREMARK,
57 /* Enumerated value for indexing an uij entry (anisotropic temperature factors) */
58 enum { U11, U22, U33, U12, U13, U23 };
60 extern void set_pdb_wide_format(bool bSet);
61 /* If bSet, use wider format for occupancy and bfactor */
63 extern void pdb_use_ter(bool bSet);
64 /* set read_pdbatoms to read upto 'TER' or 'ENDMDL' (default, bSet=FALSE) */
66 extern void write_pdbfile_indexed(FILE *out,char *title,t_atoms *atoms,
67 rvec x[],matrix box,char chain,
68 int model_nr,atom_id nindex,atom_id index[]);
69 /* REALLY low level */
71 extern void write_pdbfile(FILE *out,char *title,t_atoms *atoms,
72 rvec x[],matrix box,char chain,int model_nr);
73 /* Low level pdb file writing routine.
75 * ONLY FOR SPECIAL PURPOSES,
77 * USE write_sto_conf WHEN YOU CAN.
79 * override chain-identifiers with chain when chain>0
80 * write ENDMDL when bEndmodel is TRUE */
82 extern int read_pdbfile(FILE *in,char *title,int *model_nr,
83 t_atoms *atoms,rvec x[],matrix box,bool bChange);
84 /* Function returns number of atoms found. */
86 extern void read_pdb_conf(char *infile,char *title,
87 t_atoms *atoms,rvec x[],matrix box,bool bChange);
88 /* Read a pdb file and extract ATOM and HETATM fields.
89 * Read a box from the CRYST1 line, return 0 box when no CRYST1 is found.
90 * Change atom names according to protein conventions if wanted
93 extern void get_pdb_coordnum(FILE *in,int *natoms);
94 /* Read a pdb file and count the ATOM and HETATM fields. */
96 extern bool is_hydrogen(char *nm);
97 /* Return whether atom nm is a hydrogen */
99 extern bool is_dummymass(char *nm);
100 /* Return whether atom nm is a dummy mass */
102 #endif /* _pdbio_h */