4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-2001
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
34 * Good ROcking Metal Altar for Chronical Sinners
40 static char *SRCID_pdbio_h = "$Id$";
46 #ident "@(#) pdbio.h 1.12 7/28/97"
47 #endif /* HAVE_IDENT */
52 /* THE pdb format (for ATOM/HETATOM lines) */
53 static char *pdbformat ="%-6s%5u %-4.4s%3.3s %c%4d %8.3f%8.3f%8.3f";
54 static char *pdbformat4="%-6s%5u %-4.4s %3.3s %c%4d %8.3f%8.3f%8.3f";
56 /* Enumerated type for pdb records. The other entries are ignored
57 * when reading a pdb file
59 enum { epdbATOM, epdbHETATM, epdbANISOU, epdbCRYST1, epdbCOMPND,
60 epdbMODEL, epdbENDMDL, epdbTER, epdbHEADER, epdbTITLE, epdbREMARK,
63 /* Enumerated value for indexing an uij entry (anisotropic temperature factors) */
64 enum { U11, U22, U33, U12, U13, U23 };
66 extern void set_pdb_wide_format(bool bSet);
67 /* If bSet, use wider format for occupancy and bfactor */
69 extern void pdb_use_ter(bool bSet);
70 /* set read_pdbatoms to read upto 'TER' or 'ENDMDL' (default, bSet=FALSE) */
72 extern void write_pdbfile_indexed(FILE *out,char *title,t_atoms *atoms,
73 rvec x[],matrix box,char chain,
74 int model_nr,atom_id nindex,atom_id index[]);
75 /* REALLY low level */
77 extern void write_pdbfile(FILE *out,char *title,t_atoms *atoms,
78 rvec x[],matrix box,char chain,int model_nr);
79 /* Low level pdb file writing routine.
81 * ONLY FOR SPECIAL PURPOSES,
83 * USE write_sto_conf WHEN YOU CAN.
85 * override chain-identifiers with chain when chain>0
86 * write ENDMDL when bEndmodel is TRUE */
88 extern int read_pdbfile(FILE *in,char *title,int *model_nr,
89 t_atoms *atoms,rvec x[],matrix box,bool bChange);
90 /* Function returns number of atoms found. */
92 extern void read_pdb_conf(char *infile,char *title,
93 t_atoms *atoms,rvec x[],matrix box,bool bChange);
94 /* Read a pdb file and extract ATOM and HETATM fields.
95 * Read a box from the CRYST1 line, return 0 box when no CRYST1 is found.
96 * Change atom names according to protein conventions if wanted
99 extern void get_pdb_coordnum(FILE *in,int *natoms);
100 /* Read a pdb file and count the ATOM and HETATM fields. */
102 extern bool is_hydrogen(char *nm);
103 /* Return whether atom nm is a hydrogen */
105 extern bool is_dummymass(char *nm);
106 /* Return whether atom nm is a dummy mass */
108 #endif /* _pdbio_h */