Re: [AMBER-Developers] Backup file renaming?

From: Joe Krahn <krahn.niehs.nih.gov>
Date: Fri, 06 Mar 2009 10:39:44 -0500

David A. Case wrote:
> On Thu, Mar 05, 2009, Joe Krahn wrote:
>
>> Another question about file I/O. I have my own routines similar to
>> amopen() that automatically allocates LUNs. It also makes backup files
>> similar to CNS, which is sort of a VMS emulation. A replaced file
>> becomes <filename>_1. If <filename>_1 exists, it is moved to
>> <filename>_2, and so on up to some max-backup limit.
>>
>> In general, it is easier to run with file overwriting enabled. This
>> feature gives you the ease of use, but saves you from the occasional
>> loss of a file that you didn't want to delete.
>
> Again, if we do this, we have to explain it. There are OS-level
> routines that will accomplish this for Linux systems, I believe. I
> understand the desire for this, but also want to avoid making Amber even
> more complex....
>
>
> ...dac
>
The only OS-level routine needed is RENAME(), assuming that intrinsic
INQUIRE commands work as they should. I only suggest it because I
already have code to do it. The usefulness of renaming depends on how
often regular AMBER users accidentally overwrite files.

I think the automatic LUN allocation is always useful for large
projects, and is easy to implement with INQUIRE opened=, which is
already used by 'sander/ncsu-utils.f'. It could be built in to the
existing amopen(), where lun is assigned a value if called with lun=-1.

I won't try anything for now, unless other developers show some interest.

Joe

_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Sun Mar 08 2009 - 01:09:20 PST
Custom Search