char
*buf;
snew(buf,200);
+ /* ORCA settings on the system */
buf = getenv("BASENAME");
if (buf){
snew(qm->orca_basename,200);
}
else
gmx_fatal(FARGS,"no $BASENAME\n");
+
+ /* ORCA directory on the system */
+ snew(buf,200);
+ buf = getenv("ORCA_PATH");
+ fprintf(stderr,"%s",buf);
+
+ if (buf){
+ snew(qm->orca_dir,200);
+ sscanf(buf,"%s",qm->orca_dir);
+ }
+ else
+ gmx_fatal(FARGS,"no $ORCA_PATH, check manual\n");
+
+ fprintf(stderr,"%s...\n",qm->orca_dir);
fprintf(stderr,"orca initialised...\n");
/* since we append the output to the BASENAME.out file,
we should delete an existent old out-file here. */
return(QMener);
}
-void do_orca(int step,char *exe, char *basename)
+void do_orca(int step,char *exe, char *orca_dir, char *basename)
{
/* make the call to the orca binary through system()
*/
char
buf[100];
- sprintf(buf,"%s %s.inp >> %s.out",
+ sprintf(buf,"%s/%s %s.inp >> %s.out",
+ orca_dir,
"orca",
basename,
basename);
snew(MMgrad,mm->nrMMatoms);
write_orca_input(step,fr,qm,mm);
- do_orca(step,exe,qm->orca_basename);
+ do_orca(step,exe,qm->orca_dir,qm->orca_basename);
QMener = read_orca_output(QMgrad,MMgrad,step,fr,qm,mm);
/* put the QMMM forces in the force array and to the fshift
*/