[gmx-users] Re: QMMM with ORCA

Xiaohu Li xiaohuli914 at gmail.com
Wed Jan 26 23:20:31 CET 2011


Hi, All,
     Just want to share information on this thread.
     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
/usr/local/bin/orca
and the BASENAME(prefix of the *.tpr file) is longlonglonglonglonglong
then gromacs will write
/usr/local/bin/orca longlonglonglonglonglong.inp >>
longlonglonglonglonglong.out
to a buffer called buf.
     By default, this buffer has character length of 100(roughly line ~ 410)
char buf[100]
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.
    More will be updated if I find anything else.


Xiaohu


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


More information about the gromacs.org_gmx-users mailing list