Re: [gmx-users] Basic Understanding about Gromacs C library

2016-07-06 Thread Murilo Kramar
Hello Friends,


I've been working in the template and now I have a bit more understanding
of how to work on it. Now I'm facing a problem wherein I want to make new
selections other than the original selection that is updated by gmx_ana_do()
.
Basically, I should pick one of the atoms selected as a "guest" and then
select other atoms of the same type that are in a specif range (so called
"neighbor") so I can measure the distance from the guest and from each
neighbor to a specif position.

Is there any function that allows me to make another selection inside the
analyze function or I need to write one by my own?

When I take a look to the gmx_select I identify that maybe these lines
could provide me something:

 /* Initialize reference calculation for masks */
if (fnMask)
{
gmx_ana_get_topology
(trj,
FALSE, , NULL);
snew(d.mmap, 1);
gmx_ana_indexmap_init
(d.mmap,
sel[0]->g 
,
top, sel[0]->p 
.m
.type
);
}Am I heading to the correct path or am I missing something?


I appreciate the help,


Murilo.
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Basic Understanding about Gromacs C library

2016-06-20 Thread Murilo Kramar
Thanks for your answers and sorry for not describing my problem.


So, basically my problem is based on selections and some linear algebra
calculation. First of all I select a specific type of atoms and after that
I select a different group and calculate the angle of these atoms in
respect of a fixed point and other geometric properties.


If I'm correct I should use the '-selection' property by modifying this
struct (as in the second selection):


const char *mySel[] = {"name C"};


t_pargs pa[] = {

{"-cutoff", FALSE, etREAL, {},

"Cutoff for distance calculation (0 = no cutoff)"},

{"-select", FALSE, etSTR, {mySel},

"Trying to do some selection"},

};


What I don't get is whether this selection is going to be passed to the
analyze_frame or not. Because if it does, then I need to do a further
selection that relies on the first one and I don't know how to proceed.


Thanks again,


Murilo.

On Fri, Jun 17, 2016 at 12:59 AM, David van der Spoel 
wrote:

> On 16/06/16 19:29, Murilo Kramar wrote:
>
>> Greetings, List,
>>
>> I have a set of data that I used to analyze through VMD. As the set is
>> quite heavy and there are many of them, using VMD was a bit cumbersome. So
>> it has been decided that working in GROMACS would present benefits.
>>
>> The first step that I executed was to compile via CentOs terminal  the
>> 'template.c' that comes with GROMACS 4.6.3 (the version that my group
>> works
>> with) in order to get used to its programming style. When it executes
>> there
>> is a 'header' telling some basic info about  the program (such as
>> command-line options used) and after that  I'm inquired to make selections
>> (to fill the -select option) . Where does this header come from? I'm
>> pretty
>> sure it is not coded directly in the 'template.c'. I ask this because I'm
>> trying to use the -select option inside the code, but it seems that I
>> can't
>> do that when I have this input asking.
>>
>
> You do not say what you are trying to analyze. Gromacs has many analysis
> tools ready to use.
>
>
>> I'm worried that this is a too simple question, but I'm really stuck at
>> this for 3 days. Pardon me if it is.
>>
>> Thanks in advance.
>>
>> Murilo G. K.
>> 
>>
>>
>
> --
> David van der Spoel, Ph.D., Professor of Biology
> Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
> sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
>
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-requ...@gromacs.org.
>
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Basic Understanding about Gromacs C library

2016-06-17 Thread David van der Spoel

On 16/06/16 19:29, Murilo Kramar wrote:

Greetings, List,

I have a set of data that I used to analyze through VMD. As the set is
quite heavy and there are many of them, using VMD was a bit cumbersome. So
it has been decided that working in GROMACS would present benefits.

The first step that I executed was to compile via CentOs terminal  the
'template.c' that comes with GROMACS 4.6.3 (the version that my group works
with) in order to get used to its programming style. When it executes there
is a 'header' telling some basic info about  the program (such as
command-line options used) and after that  I'm inquired to make selections
(to fill the -select option) . Where does this header come from? I'm pretty
sure it is not coded directly in the 'template.c'. I ask this because I'm
trying to use the -select option inside the code, but it seems that I can't
do that when I have this input asking.


You do not say what you are trying to analyze. Gromacs has many analysis 
tools ready to use.




I'm worried that this is a too simple question, but I'm really stuck at
this for 3 days. Pardon me if it is.

Thanks in advance.

Murilo G. K.





--
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205.
sp...@xray.bmc.uu.sehttp://folding.bmc.uu.se
--
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.


Re: [gmx-users] Basic Understanding about Gromacs C library

2016-06-16 Thread Christopher Neale
Writing your own analysis tool in template.c might not be the best solution 
either. You have to worry about things like pbc breaking and you in many cases 
need to write routines that already exist elsewhere. I suggest looking into 
standalone analysis kits such as http://loos.sourceforge.net/ or 
http://www.mdanalysis.org/ (I am sure there are others too). While you can 
write your own core analyses in these tools using python or in some cases C, 
the libraries to do the transformations you want are generally available 
already.

As to your exact question, I presume the header is written by the function 
CopyRight() .. you're asking about the part of the output that starts ":-)  G  
R  O  M  A  C  S  (-:", right?

I'm not sure how to stop the program for asking for input, I but I presume you 
could set it inside the program and then pipe some nonsense in at runtime to 
make the selections and it should work for now until somebody else responds as 
long as you set the value after the input is read (and exit statement spamming 
throughout your program can helpyou to figure out what function is responsible).

Chris.


From: gromacs.org_gmx-users-boun...@maillist.sys.kth.se 
 on behalf of Murilo Kramar 

Sent: 16 June 2016 13:29:16
To: gromacs.org_gmx-users@maillist.sys.kth.se
Subject: [gmx-users] Basic Understanding about Gromacs C library

Greetings, List,

I have a set of data that I used to analyze through VMD. As the set is
quite heavy and there are many of them, using VMD was a bit cumbersome. So
it has been decided that working in GROMACS would present benefits.

The first step that I executed was to compile via CentOs terminal  the
'template.c' that comes with GROMACS 4.6.3 (the version that my group works
with) in order to get used to its programming style. When it executes there
is a 'header' telling some basic info about  the program (such as
command-line options used) and after that  I'm inquired to make selections
(to fill the -select option) . Where does this header come from? I'm pretty
sure it is not coded directly in the 'template.c'. I ask this because I'm
trying to use the -select option inside the code, but it seems that I can't
do that when I have this input asking.

I'm worried that this is a too simple question, but I'm really stuck at
this for 3 days. Pardon me if it is.

Thanks in advance.

Murilo G. K.

--
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a 
mail to gmx-users-requ...@gromacs.org.