void init_orca(t_commrec *cr, t_QMrec *qm, t_MMrec *mm)
{
- char
- *buf;
+ char *buf;
snew(buf, 200);
+
/* ORCA settings on the system */
buf = getenv("BASENAME");
if (buf)
}
else
{
- gmx_fatal(FARGS, "no $BASENAME\n");
+ gmx_fatal(FARGS, "$BASENAME not set\n");
}
/* ORCA directory on the system */
snew(buf, 200);
buf = getenv("ORCA_PATH");
- fprintf(stderr, "%s", buf);
if (buf)
{
}
else
{
- gmx_fatal(FARGS, "no $ORCA_PATH, check manual\n");
+ gmx_fatal(FARGS, "$ORCA_PATH not set, check manual\n");
}
- fprintf(stderr, "%s...\n", qm->orca_dir);
- fprintf(stderr, "orca initialised...\n");
+ fprintf(stderr, "Setting ORCA path to: %s...\n", qm->orca_dir);
+ fprintf(stderr, "ORCA initialised...\n\n");
/* since we append the output to the BASENAME.out file,
we should delete an existent old out-file here. */
sprintf(buf, "%s.out", qm->orca_basename);
void write_orca_input(int step, t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
{
- int
- i;
- t_QMMMrec
- *QMMMrec;
- FILE
- *out, *pcFile, *addInputFile, *LJCoeff;
- char
- *buf, *orcaInput, *addInputFilename, *LJCoeffFilename,
- *pcFilename, *exclInName, *exclOutName;
+ int i;
+ t_QMMMrec *QMMMrec;
+ FILE *out, *pcFile, *addInputFile, *LJCoeff;
+ char *buf, *orcaInput, *addInputFilename, *LJCoeffFilename, *pcFilename, *exclInName, *exclOutName;
+
QMMMrec = fr->qr;
+
/* write the first part of the input-file */
snew(orcaInput, 200);
sprintf(orcaInput, "%s.inp", qm->orca_basename);
out = fopen(orcaInput, "w");
+
snew(addInputFilename, 200);
sprintf(addInputFilename, "%s.ORCAINFO", qm->orca_basename);
addInputFile = fopen(addInputFilename, "r");
- fprintf(out, "#input-file generated by gromacs\n");
+
+ fprintf(out, "#input-file generated by GROMACS\n");
+
if (qm->bTS)
{
fprintf(out, "!QMMMOpt TightSCF\n");
{
fprintf(out, "!EnGrad TightSCF\n");
}
+
/* here we include the insertion of the additional orca-input */
snew(buf, 200);
if (addInputFile != NULL)
}
else
{
- fprintf(stderr, "No information on the calculation given in <%s>\n", addInputFilename);
- gmx_call("qm_orca.c");
+ gmx_fatal(FARGS, "No information on the calculation given in %s\n", addInputFilename);
}
+
fclose(addInputFile);
+
if (qm->bTS || qm->bOPT)
{
/* freeze the frontier QM atoms and Link atoms. This is
fclose(LJCoeff);
}
}
- /* write charge and multiplicity
- */
+
+ /* write charge and multiplicity */
fprintf(out, "*xyz %2d%2d\n", qm->QMcharge, qm->multiplicity);
- /* write the QM coordinates
- */
+
+ /* write the QM coordinates */
for (i = 0; i < qm->nrQMatoms; i++)
{
int atomNr;
#endif
}
fprintf(out, "*\n");
- /* write the MM point charge data
- */
+
+ /* write the MM point charge data */
if (QMMMrec->QMMMscheme != eQMMMschemeoniom && mm->nrMMatoms)
{
/* name of the point charge file */