From: Tristan Croll (
Date: Thu Jan 09 2014 - 20:03:39 CST


I've added the option to include secondary structure restraints to my gradually developing interactive MDFF extension (built from AutoIMD), and have run into a rather odd (and intermittent) problem.

The call to ssrestraints in the code is fairly straightforward:

  # If secondary structure restraints are chosen, create restraints file
  if $settings::usessrestraints {
    package require ssrestraints
    ssrestraints -psf [file join "$settings::scratchdir" automdff.psf] -pdb [file join "$settings::scratchdir" automdff.pdb] -sel "$settings::ssrestraintsseltext" $settings::restrainhbonds -o [file join "$settings::scratchdir" automdff-ssrestraints.txt]
mol delete top

... as is the addition to the namd template file:

# use secondary structure restraints if required
if $usessrestraints {
  extraBonds yes
  extraBondsFile automdff-ssrestraints.txt

I've checked, and it creates a perfectly normal looking extrabonds file. However, when I run it, roughly 3 times out of 4 I get an "abnormal EOF" error with the diagnostic giving a line partway through automdff-ssrestraints.txt. The interesting thing is that it's always truncating some power of two (2048, 4096 or 8192) characters into the file - which would suggest that a too-small chunk of memory is being pre-assigned for the file. But in that case, why does it vary from run to run (with identical conditions)?

I'm happy to send anyone a copy of the code to see if you can replicate the bug.

Tristan Croll
Faculty of Health
Institute of Health and Biomedical Engineering
Queensland University of Technology
60 Musk Ave
Kelvin Grove QLD 4059 Australia
+61 7 3138 6443

This email and its attachments (if any) contain confidential information intended for use by the addressee and may be privileged. We do not waive any confidentiality, privilege or copyright associated with the email or the attachments. If you are not the intended addressee, you must not use, transmit, disclose or copy the email or any attachments. If you receive this email by mistake, please notify the sender immediately and delete the original email.