1 /*****
2 This file is part of the Babel Program
3 Copyright (C) 1992-96 W. Patrick Walters and Matthew T. Stahl
4 All Rights Reserved
5 All Rights Reserved
6 All Rights Reserved
7 All Rights Reserved
8 
9 For more information please contact :
10 
11 babel@mercury.aichem.arizona.edu
12 --------------------------------------------------------------------------------
13 
14 FILE : wrpdb.c
15 AUTHOR(S) : Pat Walters
16 DATE : 1-93
17 PURPOSE : Routines to write a Brookhaven PDB type file.
18 
19 ******/
20 
21 static int res_count = 1;
22 
23 #include "bbltyp.h"
24 
25 int
write_dock_pdb(FILE * file1,ums_type * mol)26   write_dock_pdb(FILE *file1, ums_type *mol)
27 {
28   int i,j;
29   char type_name[5], padded_name[5];
30   int result;
31   char the_res[5], dock_name[5];
32   int dock_type;
33   int res_num;
34 
35   fprintf(file1,"%-51s%-51s\n",Title,Title);
36 
37   for (i = 1; i <= Atoms; i ++)
38   {
39     result =  get_output_type(i,"XYZ",Type(i),type_name,all_caps);
40     result =  get_output_type(i,"DOK",Type(i),dock_name,all_caps);
41     dock_type = atoi(dock_name);
42 
43     strcpy(the_res,"UNK");
44     sprintf(padded_name,"%2s",type_name);
45     strcpy(type_name,padded_name);
46     res_num = res_count;
47 
48     fprintf(file1,"ATOM   %4d %-5s%3s%3s%6d%9.3f%8.3f%8.3f%8.3f%8.3f%3d\n",
49 	    i,
50 	    type_name,
51 	    the_res,
52 	    "",
53 	    res_num,
54 	    X(i),
55 	    Y(i),
56 	    Z(i),
57 	    Charge(i),
58 	    0.0,
59 	    dock_type);
60   }
61   fprintf(file1,"TER\n");
62   res_count++;
63   return(TRUE);
64 }
65 
66 
67 
68 
69 
70 
71 
72