🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.techniques.xtallography
Article #46

Re: Generating LARGE Cartesian Lattices?

#46
From: Uncle Al
Date: Thu, 17 Oct 2002 21:28
96 lines
5832 bytes
Jon wrote:
> 
> Uncle Al <UncleAl0@hate.spam.net> wrote in message news:<3DAD8AE7.59098CA4@hate.spam.net>...
> 
> > The *problem* is that I need a 120-150 A radius, or about 250,000
> > atoms (about 9 MB of output).  Loathsome fat, stupid, and incapable
> > Windows freezes solid at those memory requirements if any attempt is
> > made to order the list or output in a window instead of a scratch
> > file.
> 
> Eventually there comes a time when it's faster to write something
> yourself, particularly when most of the programs you've mentioned are
> going to aim to draw a picture of your 250,000 atoms for you. They
> might even search through them calculating bond distances and angles
> so as to be able to draw chemically reasonable little sticks between
> the quarter of a million little balls. The problem is not the
> operating system, but the programs you are running on it.

It's both.  Metaphorically speaking, you can't buy a plain wrench
anymore.  If it doesn't come with a battery pack and an LCD screen it
isn't salable.
 
> Just loop over a, b and c lattice translations throwing away anything
> outside the radius you want. In fortran (which I hope you can read)
> that leads to something like the following:
>       program hexlat
>       a=4.0    ! a and c parameters
>       c=5.0    ! ...clearly you'll want to fill in the right numbers
>       r=150.0  ! radius of sphere
>       PI=4.0*atan(1.0)

Aw, c'mon, explictly enter it as double precision floating point.

>       iamin=int(r/a)+1      ! number of cells in a,c directions
>       icmin=int(r/c)+1      ! ...plus 1 as fortran rounds down
>       do 1 ia=-iamin,iamin
>         do 1 ib=-iamin,iamin
>           do 1 ic=-icmin,icmin
>             x=a*ia+a*ib*cos(2.*PI/3.)  ! Check these equations...
>             y=     a*ib*sin(2.*PI/3.)  ! You might want different
>             z=c*ic                     ! coords to these (a||x, c||z)
> 1           if(sqrt(x*x+y*y+z*z).le.r)write(*,*)x,y,z
>       end
> 
> At 15 lines of code (typed right in and untested :) it's hardly worth
> looking for something to download. If this is enough to get you
> started, then you just need to make a list of atoms in the origin cell
> and add those co-ordinates to the x,y and z in the code above,
> checking that the axis conventions are right. I've intentionally left
> that out as an exercise - far too much crystallography is already done
> by black boxes.

It is certainly worth a hard look.  Thanks for the boot to the head! 
My concern is at the seams when stuff starts stacking.  I prefer
existing qualified software, without the accessory bells and whistles,
that is assuredly free of bugs.  We have the 464K Fortran source code
for Bruce Ravel's ATOMS.  That could be dissected, pruned, and a
minimal GUI installed.

A 120,000-atom lattice is of no use to anybody except maybe me.  As a
synthetic organic chemist I have no feel for crystallography
software.  If somebody knows of exiting canned code, great.  If we
have to cut it out of a larger package, that's OK too.  If we write it
from scratch, that is a last resort.  

"Check these equations..."  Hell, yes!  Remember what happend to a
$billion NASA Mars probe because some jackass mixed English and metric
units.  "Aside from that, Mrs. Lincoln, how did you like the play?"
 
> > I have exhausted obscenities in seven languages damning BillGates to Hell
> 
> Empower yourself and write your own program. I can't really see
> there's a general audience for lists of 250,000 atom co-ordinates that
> can be summarised by a cell, space group and list of atoms in the
> asymmetric unit. The real problem for a general program is that
> reading a cif file and being ready for all of the possible 230 space
> groups introduces a rather large overhead.
> 
> Hope this helps,

"8^>) 

If we can't go the social advocacy route, we'll roll up our sleeves
and earn it.  The number of small unit cell heavy atom chiral lattices
in which all nearest neighbor paths are homochiral appears to be
limited to tellurium (pity about missassignment of the BiTeI
structure).  The program doesn't have to do much, just a lot of it
exactly - and dump to disk where Window's can't choke on it.

When the going gets tough, the tough look for algorithms.

-- 
Uncle Al
http://www.mazepath.com/uncleal/
 (Toxic URL! Unsafe for children and most mammals)
"Quis custodiet ipsos custodes?"  The Net!
Technical Details
Message-ID: <3DAF2B5B.601E8D20@hate.spam.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.wirehub.nl!news-hub.cableinet.net!blueyonder!newspeer1-gui.server.ntli.net!ntli.net!cox.net!p01!news2.west.cox.net.POSTED!53ab2750!not-for-mail
References: <3DAC8E95.4E7ACFD1@hate.spam.net> <85160b48.0210151846.74eeb9f6@posting.google.com> <3DAD8AE7.59098CA4@hate.spam.net> <52fe159d.0210171148.380ede5a@posting.google.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcf0b,b1027c29d7d8962b
X-Google-Attributes: gidfcf0b,public
X-Google-Thread: f804b,b1027c29d7d8962b
X-Google-Attributes: gidf804b,public
X-Google-ArrivalTime: 2002-10-17 14:28:21 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.wirehub.nl!news-hub.cableinet.net!blueyonder!newspeer1-gui.server.ntli.net!ntli.net!cox.net!p01!news2.west.cox.net.POSTED!53ab2750!not-for-mail
Message-ID: <3DAF2B5B.601E8D20@hate.spam.net>
From: Uncle Al <UncleAl0@hate.spam.net>
Organization: The Noble Krell
X-Mailer: Mozilla 4.78 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: sci.techniques.xtallography,bionet.xtallography
Subject: Re: Generating LARGE Cartesian Lattices?
References: <3DAC8E95.4E7ACFD1@hate.spam.net> <85160b48.0210151846.74eeb9f6@posting.google.com> <3DAD8AE7.59098CA4@hate.spam.net> <52fe159d.0210171148.380ede5a@posting.google.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 96
Date: Thu, 17 Oct 2002 21:28:18 GMT
NNTP-Posting-Host: 68.5.243.16
X-Complaints-To: abuse@cox.net
X-Trace: news2.west.cox.net 1034890098 68.5.243.16 (Thu, 17 Oct 2002 17:28:18 EDT)
NNTP-Posting-Date: Thu, 17 Oct 2002 17:28:18 EDT