Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / fileio / pdbio.h
index e3a69b44868cd5af833acc1885bf940d66fd903a..3e13161126c3d9c07b9765b303f720c8a21cb8b1 100644 (file)
 
 #include <stdio.h>
 
-#include "../legacyheaders/atomprop.h"
+#include "gromacs/legacyheaders/types/simple.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct gmx_atomprop;
 struct t_atoms;
 struct t_topology;
 
 typedef struct gmx_conect_t *gmx_conect;
 
-/* THE pdb format (for ATOM/HETATOM lines) */
-const char* get_pdbformat(void);
-const char* get_pdbformat4(void);
-
 /* Enumerated type for pdb records. The other entries are ignored
  * when reading a pdb file
  */
-enum {
+enum PDB_record {
     epdbATOM,   epdbHETATM, epdbANISOU, epdbCRYST1, epdbCOMPND,
     epdbMODEL,  epdbENDMDL, epdbTER,    epdbHEADER, epdbTITLE, epdbREMARK,
     epdbCONECT, epdbNR
 };
 
+/* Write a PDB line with an ATOM or HETATM record directly to a file pointer.
+ *
+ * Returns the number of characters printed.
+ */
+int
+gmx_fprintf_pdb_atomline(FILE *            fp,
+                         enum PDB_record   record,
+                         int               atom_seq_number,
+                         const char *      atom_name,
+                         char              alternate_location,
+                         const char *      res_name,
+                         char              chain_id,
+                         int               res_seq_number,
+                         char              res_insertion_code,
+                         real              x,
+                         real              y,
+                         real              z,
+                         real              occupancy,
+                         real              b_factor,
+                         const char *      element);
+
 /* Enumerated value for indexing an uij entry (anisotropic temperature factors) */
 enum {
     U11, U22, U33, U12, U13, U23
 };
 
-void set_pdb_wide_format(gmx_bool bSet);
-/* If bSet, use wider format for occupancy and bfactor */
-
 void pdb_use_ter(gmx_bool bSet);
 /* set read_pdbatoms to read upto 'TER' or 'ENDMDL' (default, bSet=FALSE).
    This function is fundamentally broken as far as thread-safety is concerned.*/
@@ -104,7 +119,7 @@ void write_pdbfile(FILE *out, const char *title, struct t_atoms *atoms,
  * which may be useful for visualization purposes.
  */
 
-void get_pdb_atomnumber(struct t_atoms *atoms, gmx_atomprop_t aps);
+void get_pdb_atomnumber(struct t_atoms *atoms, struct gmx_atomprop *aps);
 /* Routine to extract atomic numbers from the atom names */
 
 int read_pdbfile(FILE *in, char *title, int *model_nr,