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$";
36 #ident "@(#) pdbio.h 1.12 7/28/97"
37 #endif /* HAVE_IDENT */
42 /* Enumerated type for pdb records. The other entries are ignored
43 * when reading a pdb file
45 enum { epdbATOM
, epdbHETATM
, epdbANISOU
, epdbCRYST1
, epdbCOMPND
,
46 epdbENDMDL
, epdbTER
, epdbHEADER
, epdbTITLE
, epdbREMARK
, epdbNR
};
48 /* Enumerated value for indexing an uij entry (anisotropic temperature factors) */
49 enum { U11
, U22
, U33
, U12
, U13
, U23
};
51 extern void pdb_use_ter(bool bSet
);
52 /* set read_pdbatoms to read upto 'TER' of 'ENDMDL' (default, bSet=FALSE) */
54 extern void write_pdbfile_indexed(FILE *out
,char *title
,
55 t_atoms
*atoms
,rvec x
[],matrix box
,
56 char chain
, bool bEndmodel
,
57 atom_id nindex
, atom_id index
[]);
58 /* REALLY low level */
60 extern void write_pdbfile(FILE *out
,char *title
,
61 t_atoms
*atoms
,rvec x
[],matrix box
,char chain
,
63 /* Low level pdb file writing routine.
65 * ONLY FOR SPECIAL PURPOSES,
67 * USE write_sto_conf WHEN YOU CAN.
69 * override chain-identifiers with chain when chain>0
70 * write ENDMDL when bEndmodel is TRUE */
72 void hwrite_pdb_conf_indexed(FILE *out
,char *title
,
73 t_atoms
*atoms
,rvec x
[],matrix box
,
74 atom_id nindex
,atom_id index
[]);
75 /* Write a pdb file to FILE *out
76 * Use an index to only write out selected atoms. */
78 extern void write_pdb_confs(char *outfile
,
79 t_atoms
**atoms
,rvec
*x
[],int number
);
80 /* Write multiple chains to one pdb file */
82 extern int read_pdbfile(FILE *in
,char *title
,
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.
101 * The first character should be an 'M' the last character should be a digit.
104 #endif /* _pdbio_h */