[gmx-developers] How to get acces to t_atom data using new analysys framework

Alexey Shvetsov alexxy at omrb.pnpi.spb.ru
Tue Feb 5 20:20:39 CET 2013


В письме от 5 февраля 2013 21:01:11 пользователь Teemu Murtola написал:
> Hi,
> 
> On Wed, Jan 30, 2013 at 6:09 AM, Alexey Shvetsov <alexxy at omrb.pnpi.spb.ru>
> 
>  wrote:
> > What is the easyest way to get access to t_atom data from topology using
> > new
> > analysys framework?
> 
> Before you do that, you should consider whether you can achieve the same
> thing with the use of selections. This is of course not always possible,
> but if it is, it usually leads to a more flexible tool (in particular if
> your tool would assume that each position in the selection is an atom).

Selections are cool feature of new framework. But there is a caveat: old 
functions like reset_x, do_fit etc doesnt work with new framework.
> 
> On Thu, Jan 31, 2013 at 6:15 AM, Roland Schulz <roland at utk.edu> wrote:
> > untested but should work:
> > 
> > initAnalysis(const TrajectoryAnalysisSettings &, const TopologyInformation
> > &top)  {
> > 
> >  top->topology()->atoms;
> > 
> > }
> 
> Yes, this is the approach to use. In addition, you will need to either
> check for the presence of the topology (by checking the return value for
> NULL, or by calling hasTopology()), or tell the framework that your tool
> requires the topology (by calling
> TrajectoryAnalysisSettings::setFlag(efRequireTop)) to avoid crashing when
> the user does not provide a topology.

Ok. I'll use that. Can you take a look at  https://gerrit.gromacs.org/#/c/2108

> Best regards,
> Teemu
-- 
Best Regards,
Alexey 'Alexxy' Shvetsov
Petersburg Nuclear Physics Institute, NRC Kurchatov Institute, 
Gatchina, Russia
Department of Molecular and Radiation Biophysics
Gentoo Team Ru
Gentoo Linux Dev
mailto:alexxyum at gmail.com
mailto:alexxy at gentoo.org
mailto:alexxy at omrb.pnpi.spb.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130205/c50d2855/attachment.sig>


More information about the gromacs.org_gmx-developers mailing list