ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/mengine.c
Revision: 15
Committed: Thu Jun 19 00:26:16 2008 UTC (11 years, 3 months ago) by tjod
Original Path: trunk/smi23d/src/mengine/mengine.c
File size: 2269 byte(s)
Log Message:
Create new main program, mengine.c to replace gmmx.c
simplifying command line parsing (none).
Make mengine read stdin (sdf) and write stdout (sdf) instead
of files.  Makefile reflects change from gmmx to mengine.

Line File contents
1 #define EXTERN
2 #include "pcwin.h"
3 #include "pcmod.h"
4 #include "energies.h"
5 #include "substr.h"
6 #include "pot.h"
7 #include "angles.h"
8
9 #include "rings.h"
10 #include "torsions.h"
11 #include "nonbond.h"
12 #include "bonds_ff.h"
13 #include "derivs.h"
14 #include "hess.h"
15 #include "field.h"
16 #include "atom_k.h"
17 #include "cutoffs.h"
18 #include "solv.h"
19 #include "gmmx.h"
20 #include "fix.h"
21
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <unistd.h>
25 #include <string.h>
26 #include <malloc.h>
27
28 EXTERN FILE *pcmoutfile;
29
30 struct t_rotbond {
31 int nbonds, bond[200][2], bond_res[200];
32 int incl_amide, incl_alkene;
33 } rotbond;
34 struct t_minim_values {
35 int iprint, ndc, nconst;
36 float dielc;
37 } minim_values;
38
39 struct t_minim_control {
40 int type, method, field, added_const;
41 char added_path[256],added_name[256];
42 } minim_control;
43 EXTERN struct t_files {
44 int nfiles, append, batch, icurrent, ibatno;
45 } files;
46 char Savename[80];
47
48 /*
49 void initialize_pcmodel(char*);
50 void mmp22mod(int,int);
51 void pcmfin(int, int);
52 void initialize(void);
53 void mmxsub(int);
54 void check_numfile(int, char *);
55 void mac2mod(int, int);
56 void bbchk(void);
57 void type(void);
58 void initialize_gmmx(void);
59 void read_gmmxinp(char*, char*, char*, FILE*, int);
60 void run_gmmx(void);
61 void search_rings(int);
62 */
63
64 /* ==================================================== */
65 int main(int argc, char *argv[])
66 {
67 int i;
68 char *filename = NULL;
69 char *line = NULL;
70
71 char *outfile = NULL;
72 char *mmff94file = NULL;
73 char *mmxfile = NULL;
74 char *logfilename = NULL;
75
76 int flags = 0;
77 flags = flags | DO_DIPOLE;
78 flags = flags | DO_XLOGP;
79 flags = flags | DO_VIBRATION;
80
81 /*
82 filename = strdup("caffeine.sdf");
83 outfile = strdup("output.sdf");
84 */
85 mmff94file = strdup("mmff94.prm");
86 mmxfile = strdup("mmxconst.prm");
87 logfilename= strdup("error.log");
88
89 pcmoutfile = stdout;
90 initialize_pcmodel(mmxfile);
91 initialize();
92 minim_values.iprint = 0; //FALSE;
93 initialize_gmmx();
94
95 read_gmmxinp(logfilename, outfile, mmff94file, stdin, flags);
96
97 fclose(pcmoutfile);
98
99 free(mmff94file);
100 free(mmxfile);
101 free(logfilename);
102 /*
103 free(filename);
104 free(outfile);
105 */
106
107 exit(0);
108 }
109 //