4
#include <libipv1/ip_lib.h>
5
#include <libciomr/libciomr.h>
6
#include <libchkpt/chkpt.h>
7
#include <libpsio/psio.h>
16
char *cachetype = NULL;
19
errcod = ip_string("WFN", &(params.wfn), 0);
21
errcod = ip_string("REFERENCE", &(junk),0);
23
/* Default reference is RHF */
25
params.semicanonical = 0;
26
if(!strcmp(junk,"RHF")) params.ref = 0;
27
else if(!strcmp(junk,"ROHF") && !strcmp(params.wfn,"MP2")) {
29
params.semicanonical = 1;
31
else if(!strcmp(junk,"ROHF")) params.ref = 1;
32
else if(!strcmp(junk,"UHF")) params.ref = 2;
34
fprintf(outfile,"\nInvalid Reference: %s\n",junk);
35
exit(PSI_RETURN_FAILURE);
40
if(ip_exist("JOBTYPE",0)) {
41
ip_string("JOBTYPE", &(params.jobtype),0);
44
params.jobtype = strdup("SP");
48
if(ip_exist("DERTYPE",0)) {
49
ip_string("DERTYPE", &(params.dertype),0);
52
params.dertype = strdup("NONE");
55
if(!strcmp(params.jobtype,"SP")) {
57
params.relax_opdm = 0;
60
else if(!strcmp(params.jobtype,"OEPROP") && !strcmp(params.dertype,"NONE")) {
62
params.relax_opdm = 0;
65
else if(!strcmp(params.jobtype,"OEPROP") && !strcmp(params.dertype,"FIRST")) {
67
params.relax_opdm = 1;
70
else if(!strcmp(params.jobtype,"OPT") && !strcmp(params.dertype,"NONE")) {
72
params.relax_opdm = 0;
75
else if(!strcmp(params.jobtype,"OPT") && !strcmp(params.dertype,"FIRST")) {
77
params.relax_opdm = 0;
80
else if(!strcmp(params.jobtype,"FREQ") && !strcmp(params.dertype,"NONE")) {
82
params.relax_opdm = 0;
85
else if(!strcmp(params.jobtype,"FREQ") && !strcmp(params.dertype,"FIRST")) {
87
params.relax_opdm = 0;
91
printf("Invalid combination of JOBTYPE and DERTYPE\n");
92
exit(PSI_RETURN_FAILURE);
95
if((params.relax_opdm || params.gradient) &&
96
(mo.nfzdocc != 0 || mo.nfzvirt != 0)) {
97
fprintf(outfile,"\n\tThe Z-vector equations DO NOT work with frozen orbitals ... yet\n");
98
exit(PSI_RETURN_FAILURE);
102
ip_data("PRINT", "%d", &(params.print),0);
105
ip_data("CACHELEV", "%d", &(params.cachelev),0);
107
params.cachetype = 1;
108
errcod = ip_string("CACHETYPE", &(cachetype),0);
109
if (cachetype != NULL && strlen(cachetype)) {
110
if (!strcmp(cachetype,"LOW"))
111
params.cachetype = 1;
112
else if (!strcmp(cachetype,"LRU"))
113
params.cachetype = 0;
115
fprintf(outfile, "Invalide CACHETYPE = %s\n",cachetype);
121
/* get parameters related to SCS-MP2 or SCS-N-MP2 */
122
/* see papers by S. Grimme or J. Platz */
124
params.scs_scale_s = 1.0;
125
params.scs_scale_t = 1.0;
126
errcod = ip_boolean("SCS_N",&(params.scs),0);
127
if (params.scs == 1) {
128
params.scs_scale_s = 0.0;
129
params.scs_scale_t = 1.76;
132
errcod = ip_boolean("SCS",&(params.scs),0);
133
if (params.scs == 1) {
134
params.scs_scale_s = 6.0/5.0;
135
params.scs_scale_t = 1.0/3.0;
136
errcod = ip_data("SCS_SCALE_S","%lf",&(params.scs_scale_s),0);
137
errcod = ip_data("SCS_SCALE_T","%lf",&(params.scs_scale_t),0);
141
fndcor(&(params.memory),infile,outfile);
143
fprintf(outfile, "\n");
144
fprintf(outfile, "\tInput parameters:\n");
145
fprintf(outfile, "\t-----------------\n");
146
fprintf(outfile, "\tWave function \t=\t%s\n", params.wfn);
147
if(params.semicanonical) {
148
fprintf(outfile, "\tReference WFN \t=\tROHF changed to UHF for Semicanonical Orbitals\n");
151
fprintf(outfile, "\tReference WFN \t=\t%s\n", (params.ref==0)?"RHF":((params.ref==1)?"ROHF":"UHF"));
153
fprintf(outfile, "\tDerivative \t=\t%s\n", params.dertype);
154
fprintf(outfile, "\tCache Level \t=\t%d\n", params.cachelev);
155
fprintf(outfile, "\tCache Type \t=\t%s\n", params.cachetype ? "LOW":"LRU");
156
fprintf(outfile, "\tMemory (MB) \t=\t%.1f\n",params.memory/1e6);
157
fprintf(outfile, "\tPrint Level \t=\t%d\n", params.print);
158
fprintf(outfile, "\tOPDM \t=\t%s\n", params.opdm ? "YES":"NO");
159
fprintf(outfile, "\tSCS \t=\t%s\n", params.scs ? "TRUE":"FALSE");
161
fprintf(outfile, "\tSCS_SCALE_S \t=\t%.3f\n",params.scs_scale_s);
162
fprintf(outfile, "\tSCS_SCALE_T \t=\t%.3f\n",params.scs_scale_t);
165
if (params.scs && (strcmp(params.dertype,"NONE")!=0)) {
166
fprintf(outfile,"\nWarning: SCS-MP2 computation requested but\n");
167
fprintf(outfile,"derivative will be evaluated for standard MP2 energy.\n");