Bug report on use of soft_pairs larger than 6.

29 views
Skip to first unread message

Mauricio Esguerra

unread,
Jul 2, 2015, 10:12:09 AM7/2/15
to qmo...@googlegroups.com
Hi all,

For now just a forward of a bug report from Matt Mills on the use of [soft_pairs].
If anyone has seen a similar behavior and can report how they solved it we can test a bit and then implement Matt’s suggested bug fix. Thanks Matt.

Cheers, 

M.


Begin forwarded message:

From: Matthew Mills <mjohn...@gmail.com>
Subject: Q Problem
Date: 30 Jun 2015 07:59:07 CEST
To: Christoffer Lind <li...@xray.bmc.uu.se>

Hi Christoffer,

I have been using the Q program a bit more recently, and today found what seems to be a bug.
I was working on a toy system of 6 atoms, and wanted to set 8 of the interaction pairs as soft pairs using the [soft_pairs] section of the FEP file. I got a segfault whenever I set over 6 soft pairs.

Looking in the qatom.f90 file, there are two lines (912 and 913 in current github version):

allocate(iqexpnb(nqat))
allocate(jqexpnb(nqat))

which contain the indices of the interacting atoms i and j. Given that in a system of N atoms with no bonds, the max number of soft pairs would be N(N-1) / 2, I think this allocation is incorrect as it limits the number of soft pairs to N which is not right unless I am missing something important.
I changed it to 

allocate(iqexpnb(nqat*(nqat-1)/2))
allocate(jqexpnb(nqat*(nqat-1)/2))

and it works fine (no segfault). Better would be changing it to allocate the arrays using the actual number of soft pairs in the input file, but given the typically small number of Q-atoms in a system it would not save much RAM. 

I couldn't find a good way to get this to the Q-users attention so I thought I would try talking to you. Let me know if there is somewhere better to discuss this.

Thanks!
Matt Mills


+++++++++++++++++++++++++++++++++++++++++++++++
 Mauricio Esguerra Neira, Ph.D.              
 Post-Doctor                            
 Department of Cell and Molecular Biology
 Uppsala University
 Phone Number: (+46)073-678-5334             
 mesguerra.org
 mauricio...@icm.uu.se              
+++++++++++++++++++++++++++++++++++++++++++++++

Reply all
Reply to author
Forward
0 new messages