3
\brief Enter brief description of file here
8
#include <libipv1/ip_lib.h>
9
#include <libciomr/libciomr.h>
10
#include <libchkpt/chkpt.h>
11
#include <libpsio/psio.h>
17
namespace psi{ namespace mp2{
22
char *cachetype = NULL;
25
errcod = ip_string("WFN", &(params.wfn), 0);
27
errcod = ip_string("REFERENCE", &(junk),0);
29
/* Default reference is RHF */
31
params.semicanonical = 0;
32
if(!strcmp(junk,"RHF")) params.ref = 0;
33
else if(!strcmp(junk,"ROHF") && !strcmp(params.wfn,"MP2")) {
35
params.semicanonical = 1;
37
else if(!strcmp(junk,"ROHF")) params.ref = 1;
38
else if(!strcmp(junk,"UHF")) params.ref = 2;
40
fprintf(outfile,"\nInvalid Reference: %s\n",junk);
41
exit(PSI_RETURN_FAILURE);
46
if(ip_exist("JOBTYPE",0)) {
47
ip_string("JOBTYPE", &(params.jobtype),0);
50
params.jobtype = strdup("SP");
54
if(ip_exist("DERTYPE",0)) {
55
ip_string("DERTYPE", &(params.dertype),0);
58
params.dertype = strdup("NONE");
61
if(!strcmp(params.jobtype,"SP")) {
63
params.relax_opdm = 0;
66
else if(!strcmp(params.jobtype,"OEPROP") && !strcmp(params.dertype,"NONE")) {
68
params.relax_opdm = 0;
71
else if(!strcmp(params.jobtype,"OEPROP") && !strcmp(params.dertype,"FIRST")) {
73
params.relax_opdm = 1;
76
else if(!strcmp(params.jobtype,"OPT") && !strcmp(params.dertype,"NONE")) {
78
params.relax_opdm = 0;
81
else if(!strcmp(params.jobtype,"OPT") && !strcmp(params.dertype,"FIRST")) {
83
params.relax_opdm = 0;
86
else if(!strcmp(params.jobtype,"SYMM_FC") && !strcmp(params.dertype,"FIRST")) {
88
params.relax_opdm = 0;
91
else if(!strcmp(params.jobtype,"FREQ") && !strcmp(params.dertype,"NONE")) {
93
params.relax_opdm = 0;
96
else if(!strcmp(params.jobtype,"FREQ") && !strcmp(params.dertype,"FIRST")) {
98
params.relax_opdm = 0;
102
printf("Invalid combination of JOBTYPE and DERTYPE\n");
103
exit(PSI_RETURN_FAILURE);
106
if((params.relax_opdm || params.gradient) &&
107
(mo.nfzdocc != 0 || mo.nfzvirt != 0)) {
108
fprintf(outfile,"\n\tThe Z-vector equations DO NOT work with frozen orbitals ... yet\n");
109
exit(PSI_RETURN_FAILURE);
113
ip_data("PRINT", "%d", &(params.print),0);
116
ip_data("CACHELEV", "%d", &(params.cachelev),0);
118
params.cachetype = 1;
119
errcod = ip_string("CACHETYPE", &(cachetype),0);
120
if (cachetype != NULL && strlen(cachetype)) {
121
if (!strcmp(cachetype,"LOW"))
122
params.cachetype = 1;
123
else if (!strcmp(cachetype,"LRU"))
124
params.cachetype = 0;
126
fprintf(outfile, "Invalide CACHETYPE = %s\n",cachetype);
132
/* get parameters related to SCS-MP2 or SCS-N-MP2 */
133
/* see papers by S. Grimme or J. Platz */
135
params.scs_scale_os = 6.0/5.0;
136
params.scs_scale_ss = 1.0/3.0;
137
errcod = ip_boolean("SCS_N",&(params.scs),0);
138
if (params.scs == 1) {
139
params.scs_scale_os = 0.0;
140
params.scs_scale_ss = 1.76;
142
errcod = ip_boolean("SCS",&(params.scs),0);
143
if (params.scs == 1) {
144
errcod = ip_data("SCALE_OS","%lf",&(params.scs_scale_os),0);
145
errcod = ip_data("SCALE_SS","%lf",&(params.scs_scale_ss),0);
148
fndcor(&(params.memory),infile,outfile);
150
fprintf(outfile, "\n");
151
fprintf(outfile, "\tInput parameters:\n");
152
fprintf(outfile, "\t-----------------\n");
153
fprintf(outfile, "\tWave function \t=\t%s\n", params.wfn);
154
if(params.semicanonical) {
155
fprintf(outfile, "\tReference WFN \t=\tROHF changed to UHF for Semicanonical Orbitals\n");
158
fprintf(outfile, "\tReference WFN \t=\t%s\n", (params.ref==0)?"RHF":((params.ref==1)?"ROHF":"UHF"));
160
fprintf(outfile, "\tDerivative \t=\t%s\n", params.dertype);
161
fprintf(outfile, "\tCache Level \t=\t%d\n", params.cachelev);
162
fprintf(outfile, "\tCache Type \t=\t%s\n", params.cachetype ? "LOW":"LRU");
163
fprintf(outfile, "\tMemory (MB) \t=\t%.1f\n",params.memory/1e6);
164
fprintf(outfile, "\tPrint Level \t=\t%d\n", params.print);
165
fprintf(outfile, "\tOPDM \t=\t%s\n", params.opdm ? "YES":"NO");
166
fprintf(outfile, "\tSCS \t=\t%s\n", (params.scs == 1) ? "True" : "False");
167
fprintf(outfile, "\tSCALE_OS \t=\t%.6f\n",params.scs_scale_os);
168
fprintf(outfile, "\tSCALE_SS \t=\t%.6f\n",params.scs_scale_ss);
170
if (params.scs && (strcmp(params.dertype,"NONE")!=0)) {
171
fprintf(outfile,"\nWarning: SCS-MP2 computation requested but\n");
172
fprintf(outfile,"derivative will be evaluated for standard MP2 energy.\n");
177
}} /* End namespaces */