From: Axel Kohlmeyer (
Date: Mon Feb 19 2024 - 06:55:01 CST

Make sure that your trajectory file contains box information and then you
should be able to use "pbwithin" instead of "within".

On Mon, Feb 19, 2024 at 2:20 AM SHIVAM TIWARI <> wrote:

> I am not sure though, but unwrapping the trajectory and then doing the
> analysis may get the desired result.
> Just type : "pbc unwrap" in the tkconsole after loading your trajectory to
> unwrap.
> Regards,
> Shivam
> Get Outlook for Android
> <;!!DZ3fjg!9_rUXoj6pBN3PukOE75wbwnyvCTIkSpVSlB8qAupZD1hfzGDbytjatRrL1Z7cvrGifi1ADxFpI5nUM24zVBF5A$>
> ------------------------------
> *From:* <> on behalf of
> Amir <>
> *Sent:* Monday, February 19, 2024 2:24:49 AM
> *To:* <>
> *Subject:* vmd-l: atomselection near periodic boundaries
> You don't often get email from Learn why this
> is important
> <;!!DZ3fjg!9_rUXoj6pBN3PukOE75wbwnyvCTIkSpVSlB8qAupZD1hfzGDbytjatRrL1Z7cvrGifi1ADxFpI5nUM05-QDFAQ$>
> Dear all,
> I am doing some calculations on the Lammps trajectory, for which I need to
> find all information of neighbors within a cutoff around every bead. My
> code works fine for all the polymers (bead-spring model), which are well
> within the box. I am finding neighbors around a bead as follows:
> set sel [atomselect top “within 3 of index 10”]
> Suppose my bead (say index 10) is at the edge of the box, and the polymer
> and some other chains are crossing the boundary and appearing from the
> other side. This atom selection is not capturing all the neighbors,
> considering periodic boundaries. It is only giving me the beads around the
> edge, not from the other side, which are within cutt-off of my bead of
> interest considering periodic boundaries. Is there a way to get all the
> neighbors for edges? Thank you in advance.
> Best regards,
> Amir

Dr. Axel Kohlmeyer;!!DZ3fjg!9YhgNlIuBD0J5r1rwb20x6l83rivxaAVYFqa0DbyRlmNEIbq9vPrpf-VtvSFa12WuNec1fmAMZTv7B6bEg$ 
Institute for Computational Molecular Science and HPC,;!!DZ3fjg!9YhgNlIuBD0J5r1rwb20x6l83rivxaAVYFqa0DbyRlmNEIbq9vPrpf-VtvSFa12WuNec1fmAMZRUQdYnPQ$ 
College of Science & Technology, Temple University, Philadelphia PA, USA