Re: [AMBER] Fwd: AmberTools 12 pbsa: missing newline character in OpenDX output (patched gen_dx_file.F90 attached)

From: Jason Swails <jason.swails.gmail.com>
Date: Mon, 9 Jul 2012 16:04:10 -0400

On Mon, Jul 9, 2012 at 2:57 PM, Jan-Philip Gehrcke
<jgehrcke.googlemail.com>wrote:

> Hey,
>
> this was kind of urgent to me, so I looked into the issue and resolved it.
> Attached you can find the fixed version of the amber12/AmberTools/src/pbsa/
> **gen_dx_file.F90 as well as a patch file created via
>
> $ diff -u gen_dx_file.F90.orig gen_dx_file.F90 >
> gen_dx_file.F90.newline.patch
>
> As I've restructured the whole file en_dx_file.F90, the patch file is not
> really expressive. Things I've worked on:
>
> - fixed in subroutine `gen_dx_file`: if number of grid points is not an
> integer multiple of 3, the required newline character after the last data
> value is not written to DX output file.
>
> - fixed in subroutine `gen_dx_file`: DX output file name contains trailing
> spaces
>
> - cleaned up in subroutine `gen_dx_file`: variable names, variable
> declarations, code style
>
> - outcommented entire subroutines `printphidx` and `gen_integer_dx_file`
> in file gen_dx_file.F90 as they are not in use
>
> - rewrote file header, now including a link to DX format specification,
> the PBSA copyright header and author information
>
>
> I tested the new code and did not observe any problems.
>
>
> This is the first time I have worked with Fortran code. Ugh. I have
> comments/questions:
>
> 1) Shouldn't there be a central automatic 'newunit management' system in
> PBSA for preventing I/O collisions? Especially for large projects, the idea
> of relying on hard-coded numbers like `phifilenum=64` in pb_force.F90 seems
> to be risky. Are there plans for using the Fortran 2008 `newunit` feature,
> which automatically selects a unit number that does not interfere with
> other units in use?
>

We try to stay away from the 'bleeding edge' of the Fortran standard if
possible since it will severely limit portability across different
compilers and compiler versions (and HPCs are notoriously averse to
frequent updates, for good reason). There are convenient enough
workarounds to the 'newunit' intrinsic such that it's not worth ending
support for older compilers just to use that feature.

Thanks!
Jason

-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Jul 09 2012 - 13:30:03 PDT
Custom Search