RE: amber-developers: amber10 code broken in qm2_dftb_gb.f

From: Ross Walker <>
Date: Thu, 23 Nov 2006 09:04:32 -0800

Hi All,

My apologies here for using long lines although I do try to keep them below
132 characters. I think that the code is cleaner this way as it is easier to
read. At least if you have a high res screen and a large terminal. You don't
need to use small fonts, the default is fine.

> chars. I say this because I typically bring up at least 4
> windows to do
> code work, and may need that many windows or more to get the
> total context
> needed. So when you go to really long lines, you can limit

Ah you see this is the difference. What you need are 4 monitors side by
side, you can do it really well with multiple pc's if you don't have a 4 way
graphics card - see

I use this approach and just have 4 code windows open, each one maximized on
a separate screen. Then you can easily get 132 character long lines in and
it is really easy to follow the context across multiple source files.
Another option that works well are the widescreen flat panel screens they
make these days. You can use these in either a horizontal or a vertical
orientation. Setting them up vertically works great, then with 2 of them
side by side you can have 2 full width windows on one, one on top of the
other, and two on the other monitor. Or if you prefer you can maximize a
terminal on one and then you get around 140 characters wide by about 150
lines long - very very useful when looking through long subroutines.

Though I guess not everyone can do this in which case I will defer to
whatever the masses want. I am loathed to go as short as 80 characters as
this takes us back to the days of fortran 77 almost. I think the limit in
Fortran 90 is 132 characters so perhaps we can pick something in the middle
say 100 or so.

All the best

|\oss Walker

| HPC Consultant and Staff Scientist |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- |
| | PGP Key available on request |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.

> -----Original Message-----
> From:
> [] On Behalf Of Robert Duke
> Sent: Thursday, November 23, 2006 07:04
> To:
> Subject: Re: amber-developers: amber10 code broken in qm2_dftb_gb.f
> Hi guys,
> Late responding, after dealing with power being down out here
> until about
> 1:00 am last night. We don't have earthquakes, just other sources of
> excitement. I tend to stick to 80 character lines because
> not all terminal
> interfaces can handle anything bigger very smoothly. Now, if
> we are all
> using xterm-based stuff on linux boxes that resizes nicely,
> then there are
> some instances where longer lines can make the code more
> readable, in my
> view, but I would still prefer that lengths not get much
> longer than 100
> chars. I say this because I typically bring up at least 4
> windows to do
> code work, and may need that many windows or more to get the
> total context
> needed. So when you go to really long lines, you can limit
> yourself to just
> a couple of contexts effectively - two wide windows. And Tom
> is right that
> some of us do have limits as to how small we can set our
> default font, so
> that limits our ability to just make the window smaller :-)
> One way I deal
> with writing code within an 80 line limitation is to use 2
> char indents (I
> think you all have code-standardized on 3 but pmemd was all
> at 2 beforehand,
> so I am not exactly rushing right out to reformat it all,
> especially since I
> like the benefit of not having to deal with line wrapping
> more often). The
> other thing to remember here is that if your driving force
> behind really
> long lines is dealing with deep indentation levels, then
> putting appropriate
> chunks of code in subroutines can help. Chances are that if
> you are 15
> indent levels deep, you could write the code better. This is
> all what would
> be called "religion", just like language wars - no correct
> answers, but that
> is how I would justify the choices I have made.
> Happy Holidays to all - Bob
> ----- Original Message -----
> From: "darden" <>
> To: <>
> Sent: Wednesday, November 22, 2006 5:51 PM
> Subject: Re: amber-developers: amber10 code broken in qm2_dftb_gb.f
> > maybe no one else is replying---i usually get annoyed with overflow
> > lines---editor behaves strangely unless terminal set up
> right---so i like
> > an 80 character line limit--although I'm probably guilty as well of
> > violating it
> >
> > also let me just register my general annoyance with these
> generation Y
> > small font guys---just a form of age discrimination if you
> ask me--grrr
> > td
> >
> > On Wed, 22 Nov 2006, David A. Case wrote:
> >
> >> In the process of fixing up Amber 10's qm2_dftb_gb code
> (see CVS logs), I
> >> again faced the line-length problem for sander code.
> >>
> >> It has been apparent for some time that lots of people are
> unwilling to
> >> live
> >> with 80 character lines, and maybe that is a good idea in
> a modern age.
> >> But
> >> I also don't think we should allow arbitrarily long lines
> either, just
> >> because
> >> some particular person (initials are RCW) likes to use a
> small font and a
> >> giant terminal. The code becomes very difficult to read
> for everyone
> >> else.
> >>
> >> So I'm looking for input: what do people think we should
> enforce as a
> >> line
> >> length limit? And, do we have any formatters for Fortran
> that do this?
> >> (We can use indent for C-code, but I don't know where
> things stand for
> >> F90
> >> code).
> >>
> >> ...thanks for your input....dac
> >>
> >
Received on Sun Nov 26 2006 - 06:07:10 PST
Custom Search