AMBER Archive (2009)

Subject: Re: [AMBER] Max filename length in Sander?

From: Robert Duke (rduke_at_email.unc.edu)
Date: Tue Jun 09 2009 - 10:01:39 CDT


Hi Paul,
I understand the desire; hopefully one of the other guys who works more
routinely with sander will be able to track this down and fix it. I tend to
concentrate more on pmemd, and in any case my funding for doing amber work
is gone, so I am just fielding pmemd-specific stuff where I can provide a
bit of help without a lot of effort.
- Bob
----- Original Message -----
From: "Paul Mortenson" <P.Mortenson_at_astex-therapeutics.com>
To: "AMBER Mailing List" <amber_at_ambermd.org>
Sent: Tuesday, June 09, 2009 10:47 AM
Subject: RE: [AMBER] Max filename length in Sander?

Dear Bob,

Thanks very much for your help with this, I've made the change you
suggested and this has fixed the problem for PMEMD.

Thanks also to Prof Case for his input. I realise that it is possible to
work around the problem by using symbolic links, and obviously the
filenames in the example I gave are somewhat silly. In reality the
problem arose because of a deeply nested directory structure, and the
use of absolute paths (easier from within the script I was writing). I
reported the problem mainly because from looking at the code it seemed
as though the 80 character limit was not what was intended. And I also
found it a little surprising that the problem only arose when periodic
boundary conditions were being used.

I appreciate this is only a small problem, but it is a bit of a pain to
have to check the length of filenames before launching AMBER, or create
symbolic links every time (we have a number of different scripts which
we commonly use to run AMBER based jobs, all of which would need
editing) and 80 characters doesn't seem particularly long. The intended
(?) value of 256 would seem much more reasonable, and in the back of my
mind I seem to recall there may even be some kind of system (or shell)
limit at this value? If someone could manage to track this down in
sander and let me know what change(s) I need to make, I would be very
grateful. I'm afraid my rusty Fortran skills probably aren't up to the
job....

Thanks again,
Paul

-----Original Message-----
From: amber-bounces_at_ambermd.org [mailto:amber-bounces_at_ambermd.org] On
Behalf Of Robert Duke
Sent: 08 June 2009 18:31
To: AMBER Mailing List
Subject: Re: [AMBER] Max filename length in Sander?

Hi Paul,
Okay, I have looked at this for both pmemd and sander, and while I
understand what happens with pmemd, what I don't understand is why this
fails in sander. I would guess that somewhere in the stream of filename

handling there is an 80 char buffer, but it is not arg() in mdfil.f as
Dave
suggested - that reads the option flags and then the full filename
buffer
should be used for the following read of the filename (so 256 chars
available). But the name gets truncated somehow before the amopen() is
attempted. Now, getarg() is indeed supposed to truncate any returned
command
line arg longer than the output buffer, but why it is happening is very
unclear to me here. It could be that some other code is modifying the
length of the filename in the ntb 1 codepath but not the ntb 0 codepath.

Not a clue.
For pmemd, the situation is much simpler. Here I purely have 80 char
buffers, and if you go longer than that, you are dead. And since I
don't
support ntb 0 except for generalized Born, I would expect we can't test
for
the difference - it will just fail. I will leave it to the sander guys
to
figure out why things are getting truncated, but it is not obvious from
looking at the code. For pmemd, it SHOULD work to just bump up
max_fn_len
in file_io_dat.fpp, and in fact it does (ie., I just ran it for the ntb
1
case with both the long and short filenames and a max_fn_len of 128
chars).
Best Regards - Bob

----- Original Message -----
From: "David A. Case" <case_at_biomaps.rutgers.edu>
To: "AMBER Mailing List" <amber_at_ambermd.org>
Sent: Monday, June 08, 2009 8:28 AM
Subject: Re: [AMBER] Max filename length in Sander?

> On Mon, Jun 08, 2009, Paul Mortenson wrote:
>>
>> it seems that when periodic boundary conditions are turned on, the
>> maximum filename length for the inpcrd file is 80 characters.
>
> The relevant code is the length of "arg" in mdfil.f. You can probably
> increase that to 256 if you want (not tested). I don't see what this
has
> to
> do with periodic boundary conditions, though.
>
> Workaround is to create links for long file names.
>
> ....dac
>
>
> _______________________________________________
> AMBER mailing list
> AMBER_at_ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>

_______________________________________________
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Disclaimer
This communication is confidential and may contain privileged information
intended solely for the named addressee(s). It may not be used or disclosed
except for the purpose for which it has been sent. If you are not the
intended recipient you must not review, use, disclose, copy, distribute or
take any action in reliance upon it. If you have received this communication
in error, please notify Astex Therapeutics Ltd by emailing
P.Mortenson_at_astex-therapeutics.com and destroy all copies of the message and
any attached documents.
Astex Therapeutics Ltd monitors, controls and protects all its messaging
traffic in compliance with its corporate email policy. The Company accepts
no liability or responsibility for any onward transmission or use of emails
and attachments having left the Astex Therapeutics domain. Unless expressly
stated, opinions in this message are those of the individual sender and not
of Astex Therapeutics Ltd. The recipient should check this email and any
attachments for the presence of computer viruses. Astex Therapeutics Ltd
accepts no liability for damage caused by any virus transmitted by this
email. E-mail is susceptible to data corruption, interception, unauthorized
amendment, and tampering, Astex Therapeutics Ltd only send and receive
e-mails on the basis that the Company is not liable for any such alteration
or any consequences thereof.
Astex Therapeutics Ltd., Registered in England at 436 Cambridge Science
Park, Cambridge CB4 0QA under number 3751674

_______________________________________________
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber