From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Jan 10 2014 - 09:33:58 CST

Tristan,
  If the file truncation (lack of a call to close it) occurs when calling
routines in the ssrestraints plugin, then the most likely cause is that
you are doing something that is triggering a failure inside of the
ssrestraints code, and that is causing it to error out of what it's doing,
leaving the output file un-closed when it returns. If you're not getting
a Tcl traceback, then ssrestraints may be using a try/catch scheme to watch
for certain kinds of problems, and it's not doing the right thing in the
particular cases that you're having issues with. If you can provide a
minimalistic sequence of commands and/or input files that reproduces
the behavior you're seeing, it shouldn't be too difficult to track
down the source of the problem, whether it's something completely
internal to ssrestraints or potentially caused by invalid input of
some kind, or whatever else it might be.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Jan 10, 2014 at 02:25:24PM +1000, Tristan Croll wrote:
> > This sounds more like a file not being properly closed to me.
>
> > Axel.
>
> I'm at a loss as to where that might be happening. I haven't added any
> read/write entries to the code myself - all file handling is being done by
> calls to existing packages (mdff, ssrestraints, etc.). As far as I can
> tell they all seem to be fine at cleaning up after themselves.
>
>
>
> Tristan
>
>
>
> From: Axel Kohlmeyer [mailto:akohlmey_at_gmail.com]
> Sent: Friday, 10 January 2014 1:50 PM
> To: Tristan Croll
> Cc: Vmd l
> Subject: Re: vmd-l: strange problems adding extra bonds to interactive
> simulations
>
>
>
> On Jan 9, 2014 9:52 PM, "Tristan Croll" <tristan.croll_at_qut.edu.au> wrote:
> >
> > Hi,
> >
> >
> >
> > 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)?
> >
>
> This sounds more like a file not being properly closed to me.
>
> Axel.
>
> >
> >
> > I'm happy to send anyone a copy of the code to see if you can replicate
> the bug.
> >
> >
> >
> > Tristan Croll
> >
> > Lecturer
> >
> > 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.
> >
> >
> >
> >

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/