[AMBER] pytraj Error: No reference set, cannot select by distance.

From: Thomas Evangelidis <tevang3.gmail.com>
Date: Thu, 17 Jan 2019 16:48:46 +0100

Greetings,

I want to get the total charge of an atom selection using pytraj.

traj = pt.load('complex_postmin.min_GB.rst', 'complex.prmtop',
> frame_indices=[0])
> mask = ':LIG<:6.000 & ! :WAT,LIG'
> print traj[mask].top.charge.sum()


pytraj complains 'Error: No reference set, cannot select by distance.' and
returns a value which is the total charge of ':WAT,LIG'. I understand that
I must define a reference frame to calculate the distances but I don't know
how. Could someone please show me how to do it? Is there also an option to
load only the last frame of the trajectory without knowing the total number
of frames in advance?

Thanks.
Thomas


-- 
======================================================================
Dr Thomas Evangelidis
Research Scientist
IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy
of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en>
Prague, Czech Republic
  &
CEITEC - Central European Institute of Technology <https://www.ceitec.eu/>
Brno, Czech Republic
email: tevang3.gmail.com
website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jan 17 2019 - 08:00:02 PST
Custom Search