Hi, All,<br>     Just want to share information on this thread.<br>     Regarding to the segmentation fault. I have found out that gromacs call orca by write command to a buffer called buf. So for example, if the orca path is <br>
/usr/local/bin/orca<br>and the BASENAME(prefix of the *.tpr file) is longlonglonglonglonglong<br>then gromacs will write <br>/usr/local/bin/orca longlonglonglonglonglong.inp &gt;&gt; longlonglonglonglonglong.out<br>to a buffer called buf.<br>
     By default, this buffer has character length of 100(roughly line ~ 410)<br>char buf[100]<br>and it turns out that my orca_path plus the BASENAME is a really long string, definitely exceeding 100. It seems that this is causing the problem since after I increased the buf length to 1000, the optimization at least runs and gradient has been read.<br>
    More will be updated if I find anything else.<br><br><br>Xiaohu<br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi, All,<br>
     I&#39;m trying to see if anybody has experience of using the interface of<br>
gromacs and ORCA(since it&#39;s free). I know that the following link gave<br>
information on how<br>
<a href="http://wwwuser.gwdg.de/%7Eggroenh/qmmm.html#code" target="_blank">http://wwwuser.gwdg.de/~ggroenh/qmmm.html#code</a><br>
     But.....But, the gromacs in the above link is quite old(3.2). I<br>
download the latest 4.5.3 and followed the instructions in the above link<br>
and I was trying to optimize an simple cluster(no pbc) where part of it are<br>
treated using QM. here is the example mdp file<br>
=========================================================================================================================<br>
title               =  cpeptide<br>
integrator          =  steep   ;integrator includes energy minimization<br>
algorithms<br>
dt                  =  0.002    ; ps !<br>
nsteps              =   10000<br>
nstlist             =  1<br>
ns_type             =  simple<br>
rlist               =  3.0<br>
rcoulomb            =  3.0<br>
coulombtype         = cut-off<br>
vdwtype             = cut-off<br>
rvdw                = 3.0<br>
pbc                 =  no<br>
periodic_molecules  =  no<br>
constraints         = none<br>
energygrps          = qm_part mm_part<br>
; QM/MM calculation stuff<br>
QMMM = yes<br>
QMMM-grps = qm_part<br>
QMmethod = rhf<br>
QMbasis = 3-21G<br>
QMMMscheme = oniom<br>
QMcharge = 0<br>
QMmult = 1<br>
;<br>
;       Energy minimizing stuff<br>
;<br>
emtol               =  60   ; minimization thresold (kj/mol.nm-1)    1<br>
hartree/bohr= 49614.75241 kj/mol.nm-1  1 kj/mol.nm-1=2.01553e-5 hartree/bohr<br>
emstep              =  0.01  ; minimization step in nm<br>
=========================================================================================================================<br>
I set up the BASENAME and ORCA_PATH as told in the instruction.<br>
first of all, the normal electronic embedding just simply gave segmentation<br>
fault error right after the it prints information on number of steps of<br>
optimization.<br>
<br>
So I switch to ONIOM, this time, at least, orca is called and energy and<br>
gradient are both generated. However, when it comes to read the energy and<br>
gradient, it always crashes when tried to read gradient, this is at *line<br>
346* source code src/mdlib/qm_orca.c<br>
============================================<br>
sscanf(buf,&quot;%lf\n&quot;, &amp;QMgrad[k][XX]);<br>
============================================<br>
a segmentation fault error is printed. If I replace the &amp;QMgrad[k][XX] by an<br>
temporary variable temp<br>
 sscanf(buf,&quot;%lf\n&quot;, &amp;temp);<br>
temp gets the correct value and if I use,<br>
QMgrad[k][XX]=temp<br>
and tries to print QMgrad[k][XX], a bus error will be printed.<br>
I did some research online, seems that usually this implies an memory bug in<br>
the code which is the most difficult bug one can ever encounter.<br>
So has anyone successfully used gromacs and orca to do QMMM?<br>
Generally, would anyone recommend using gromacs to do QMMM?<br>
<br>
Cheers,<br>
Xiaohu<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.gromacs.org/pipermail/gmx-users/attachments/20110125/16819c97/attachment-0001.html" target="_blank">http://lists.gromacs.org/pipermail/gmx-users/attachments/20110125/16819c97/attachment-0001.html</a><br>

<br></blockquote></div>