#45 Tinker format

v10
closed
nobody
5
2005-01-14
2004-08-02
Nicolas
No

Is it possible to add the reading of the Tinker format ?
The home site of Tinker is http://dasher.wustl.edu/tinker/

If it can help, I'm willing to help as developper to add
this feature.

Description :
SAMPLE.XYZ

The .xyz file is the basic TINKER Cartesian coordinates
file type. It contains a title line followed by one line for
each atom in the structure. Each line contains: the
sequential number within the structure, an atomic
symbol or name, X-, Y-, and Z-coordinates, the force
field atom type number of the atom, and a list of the
atoms connected to the current atom. Except for
programs whose basic operation is in torsional space, all
TINKER calculations are done from some version of
the .xyz format.

Discussion

  • Michael

    Michael - 2004-08-02

    Logged In: YES
    user_id=608250

    I think it would be straightforward to add support for this
    file format.

    It is a unfortunate that they chose .xyz as the file name
    extension, since this extension was taken by SGI xmol long
    ago. The good news is that this won't really hurt Jmol.

    This text description hardly qualifies as a "file format
    specification".

    Q: Is there a better description available?

    Q: What is meant by "atomic symbol or name" ?

    Q: What is a "force field atom type number" ?

    Please send me two files ... one with only a few atoms and
    one with many atoms. miguel@jmol.org

    If you want to work on this yourself, then you should check
    out the Jmol source from anonymous cvs. Look at
    src/org/jmol/adapter/smarter ... ModelResolver.java &
    XyzReader.java

    Miguel

     
  • Nicolas

    Nicolas - 2004-08-02

    About 200 atoms

     
  • Nicolas

    Nicolas - 2004-08-02

    Logged In: YES
    user_id=1096197

    I put two files (200 and 400 atoms). They're the only files I
    have just now. Tomorrow I should be able to send other files.

    About your questions, I don't exactly know. I participate in a
    distributed computing project about protein folding
    (http://folding.stanford.edu) and I would like to see the
    proteins with jmol.

     
  • Nicolas

    Nicolas - 2004-08-02

    Logged In: YES
    user_id=1096197

    I will have a look at ModelResolver.java and XyzReader.java
    to see how I can develop the tinker reader.
    Thanks for your answer

     
  • Nicolas

    Nicolas - 2004-08-02

    About 400 atoms

     
  • Miguel

    Miguel - 2004-08-03

    Logged In: YES
    user_id=1050060

    Hmmm ... each of these files has a problem ...

    p269_h2o has 216 atoms. The top line has the atom count of
    216. This is consistent with the last line of the file. The
    problem with this file is ... it is not clear to me what the
    mechanism should be to determine what the element type is.
    That is, I do not know how to determine the element type
    from the atom names.

    I suggest that we try to find some examples which have
    element symbols with more than one character. Hopefully they
    will use a lower case second letter ... in order to be able
    to distinguish between CA (alpha carbon) and Ca (calcium)
    ... HG and He, etc.

    There are different problems with p639_L939_K12M_nat:

    The top line says that there are 392 atoms in the file. But,
    in fact, there are 393.

    Each of the lines is terminated by two Carriage Return
    characters \r and one newline character \n. In order to be
    cross-platform, Jmol/java needs to recognize \r as a valid
    end-of-line sequence (for MacOS). Therefore, the sequences
    \r\r\n will be recognized as as new end-of-line sequences \r
    and \r\n

    And again we have an atom naming problem ... although this
    one seems slightly different. This file has atom names like
    CH and CH2. I suppose that these are carbons ... but is
    there something special that would be done about the implied
    hydrogens?

    I will give you my honest feedback ... I now have concerns
    about supporting this file format. File formats are a
    nightmare. And if the Tinker developers were so sloppy in
    defining their format then we will have a large number of
    problems.

    At this point I am not saying no, but be advised that I am
    nervous :-)

    Miguel

     
  • Egon Willighagen

    Logged In: YES
    user_id=25678

    Miguel, file formats is something I can do. The rendering stuff is still
    out of my league, so let me take take over this request, ok? BTW,
    these test files are not yet in cvs, are they? I'll add them...

     
  • Nicolas

    Nicolas - 2004-08-03

    Other files

     
  • Nicolas

    Nicolas - 2004-08-03

    Logged In: YES
    user_id=1096197

    I will try to get more information on the file format in the
    forums of folding@home. I let you know when I have info.

    If I get the answers, I don't mind working on the reader
    myself.

    BTW, I got some other files as examples. I put them in a zip.

     
  • Nobody/Anonymous

    Logged In: NO

    Egon,

    I did not add the files to CVS because they looked somewhat
    ugly. Therefore, I decided to wait until we were sure that
    we had some good files.

    We should ook at the new files that Nico uploaded and see
    whether or not they are good.

    Miguel

     
  • Miguel

    Miguel - 2004-08-03

    Logged In: YES
    user_id=1050060

    I looked at the files in xyz.zip

    all.xyz, mmi.xyz, siel1.xyz, siel3.xyz
    appear to be OK

    siel2.xyz, siel5.xyz
    atom count on the first line is off by 1

    dat.xyz, sgza1.xyz, sgza2.xyz
    atom count off by 1 & extra CR chars at EOLs

    Both of these problems with the atom count and with the
    extra CR characters at the ends of the lines seems to be a
    systematic problem.

    I have no problems supporting the files that are OK, but we
    should not put any effort into trying to support the files
    that have problems. Rather, we should encourage the Tinker
    team to fix it.

    Miguel

     
  • Nicolas

    Nicolas - 2004-08-04

    Logged In: YES
    user_id=1096197

    I found an program written in C for reading and displaying the
    files (http://boston.quik.com/rph/fah.html). The program is
    under GNU Public License.

    I'm going to look at the code to see how the files are read
    and then I will do a reader for jmol.

     
  • Miguel

    Miguel - 2004-08-04

    Logged In: YES
    user_id=1050060

    Nico,

    This file format is very simple and is closely related to
    the xyz file format. While using the C program may be good
    for reference, I recommend that you look at the XyzReader.

    Before we get started coding we need to resolve the three
    outstanding file format issues:

    1. How do you determine element type?
    2. What do you do when the atom count is inconsistent with
    the number of atoms?
    3. What do you do about the extra \r characters that are at
    the ends of the lines?

    Miguel

     
  • Nicolas

    Nicolas - 2004-08-04

    Logged In: YES
    user_id=1096197

    I want to use the C program to understand what to do with
    the information in the file, not how to read it, so that I can
    answer your questions about the outstanding issues ;)

    About the coding part, I've already done a first version of the
    reader that reads the atoms and the bounds correctly.

    To answer your questions :

    1. There seems to be some code in the C program that
    determines the element type from the name. I will try to
    analyze this part to do something similar.

    2. In the C program, the case of inconsistent atom count is
    dealt with : the program tries to read one more atom from the
    file. I did the same thing in the reader and it works.

    3. The extra \r is seen as an empty line between each line.
    When I find such an empty line, I read an other line. It works.

    Do you think the solutions for 2 and 3 are acceptable ?

    The reader works for all the sample files I sent. I have to
    spend more time on the element type.

    Nico

     
  • Miguel

    Miguel - 2004-08-04

    Logged In: YES
    user_id=1050060

    I'm glad that you are making progress.

    I will give you my honest feedback. It is not directed at
    you ... it is directed at the Tinker team.

    <flame>

    From the small amount of data that I have seen, it is
    evident to me that the software was put together by amateurs.
    1. they created their own file format ... for no good reason
    2. they cannot count reliably ... sometimes they are off by one
    3. they cannot consistently generate a text file
    4. they don't know how to deal with element names

    However, there must be some redeeming quality ... at least
    one other person has hacked together a C program which deals
    with their twisted file output.

    I am not angry. Just disappointed once again by the poor
    quality of workmanship in another piece of chemistry software.

    </flame>

    The Jmol code is quite clean and does not currently have any
    hacks/kludges of this magnitude. So I shudder at the thought
    of adulterating the code with this type of crap.

    On the other hand, you have taken the initiative to tackle
    this, and you should be rewarded for that.

    So ... let's keep talking and see if we can work something
    out :-)

    Q: Have you received *any* response from anyone on the
    Tinker team?

    Q: Is the code open-source? If so, I *might* be willing to
    fix the Tinker code rather than break the Jmol code.

    Let's keep talking.

    Miguel

     
  • Nicolas

    Nicolas - 2004-08-14

    Logged In: YES
    user_id=1096197

    Hi, sorry for not answering sooner : too much work before
    going on holidays.

    I will give on the context for which I asked about a tinker
    reader.
    I participate (as a computer cycles donator) in a distributed
    computing project to simulate protein folding. It's called
    Folding@Home (fah), the web site is at
    http://folding.stanford.edu.

    The fah project use different cores to do the actual
    computations :Tinker and Gromacs.
    Tinker core is based on the Tinker Software
    (http://dasher.wustl.edu/tinker/). Source code in Fortan is
    publicly available.
    Gromacs core is based on the Gromacs Software
    (http://www.gromacs.org/) under GPL license.

    The softwares has been modified to best suit the needs of
    fah, and these modifications are not available. I doubt that
    modifications on the original software will be included in fah
    cores (for example, fah uses a tinker core based sur version
    3.8 when the current version is 4.2).
    So I don't see a way to include modifications in fah cores.

    Concerning the differences in the files I sent, they are due to
    the different cores and OS :
    - all, dat, mmi, sgza1, sgza2 are Windows, others are Linux
    - all, mmi, siel1, siel3 are gromacs, others are tinker.
    Tinker core is off by one in the atom count.
    Tinker core under windows puts two \r at the end of line.

    Concerning the atom names, I look at other softwares that
    can display the files I sent, and they use the first letter for
    the element symbol. I did the same on the reader.

    I decided to finish the reader and send it to you.
    I hope you will be ok to include it in jmol. Let me know if you
    need me to do anything else for it.

    I have an other question : is it possible to include jmol
    windows in an other application ? As a display area, with the
    contextual menu.
    I'm trying to develop a small monitoring tool for fah, capable
    of monitoring several computers running fah. I'd like to add a
    display for the protein being computed, jmol would be really
    useful :)

    Thanks for your help.

     
  • Nicolas

    Nicolas - 2004-08-14
     
  • Nicolas

    Nicolas - 2004-08-14

    Big protein with more than 6.000 atoms

     
  • Nicolas

    Nicolas - 2004-08-14

    Patch for ModelResolver.java

     
  • Nicolas

    Nicolas - 2005-01-12

    Logged In: YES
    user_id=1096197

    After discussing with Egon, I committed the reader and a few
    samples in CVS.

     
  • Nicolas

    Nicolas - 2005-01-14
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks