<div dir="ltr">Hello,<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 22, 2014 at 11:55 PM, Yunlong Liu <span dir="ltr">&lt;<a href="mailto:yliu120@jh.edu" target="_blank">yliu120@jh.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">Sorry to spam your mailbox but I really like to ask you some
    questions regarding to how to use the API of Gromacs 5.0.<br></div></blockquote><div><br></div><div>Please keep correspondence like this on the mailing lists; you have a chance of getting a reply faster, and others will benefit from the discussion.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    I read the content on the website
    <a href="http://jenkins.gromacs.org/job/Doxygen_Nightly_master/javadoc/html-user/cmdlinehelpwriter_8h.xhtml" target="_blank">http://jenkins.gromacs.org/job/Doxygen_Nightly_master/javadoc/html-user/cmdlinehelpwriter_8h.xhtml</a>.
    But the example and the instructions are too less to make sense for
    me. So for example, I would like to know if I have a trr trajectory
    file, how I can read out the position information of a certain
    selection, e.g., &quot;resid 940 to 950&quot; to an array.</div><br>Can you please give me an example of the code?<br></blockquote><div><br></div><div>What exactly have you read, and what things would you like to have clarified? Have you compiled the template analysis program and studied how it works (e.g., based on the documentation)? That should provide a simple enough starting point for experimenting. The documentation cannot possibly cover examples of all imaginable uses.</div>
<div><br></div><div>As Roland already pointed out on the mailing list, your question is somewhat too specific: if you start from the analysis program template, you will automatically get support for multiple trajectory formats and allow the user of the tool to provide the selection on the command line or interactively. To access the position information for a selection, you use the Selection and SelectionPosition classes. Both are used in the template program to show how to access the objects, and you can look up the full list of members (e.g., for accessing the coordinates) in the documentation.</div>
<div><br></div><div>You can also take a look at the existing tools in src/gromacs/trajectoryanalysis/modules/. For example distance.cpp contains a relatively simple tool that accesses coordinates directly.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">And further, where
    do you present the standard of those selection parse, like resid or
    residue, which one is the correct format? </div></blockquote><div><br></div><div>Some basics of the selections are explained in the manual, and it references &#39;gmx help selections&#39; (which you can type on the command line) for details on the syntax. You can also access the same help by typing &#39;help&#39; in the interactive selection prompt (that you get by, e.g., running the template analysis program or &#39;gmx select&#39; with some input files). </div>
<div><br></div><div>Best regards,</div><div>Teemu </div></div></div></div>