From: Axel Kohlmeyer (akohlmey_at_gmail.com)
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 <t.shivam_at_iitg.ac.in> 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
> <https://urldefense.com/v3/__https://aka.ms/AAb9ysg__;!!DZ3fjg!9_rUXoj6pBN3PukOE75wbwnyvCTIkSpVSlB8qAupZD1hfzGDbytjatRrL1Z7cvrGifi1ADxFpI5nUM24zVBF5A$>
> ------------------------------
> *From:* owner-vmd-l_at_ks.uiuc.edu <owner-vmd-l_at_ks.uiuc.edu> on behalf of
> Amir <amirsuhail029us_at_gmail.com>
> *Sent:* Monday, February 19, 2024 2:24:49 AM
> *To:* vmd-l_at_ks.uiuc.edu <vmd-l_at_ks.uiuc.edu>
> *Subject:* vmd-l: atomselection near periodic boundaries
>
> You don't often get email from amirsuhail029us_at_gmail.com. Learn why this
> is important
> <https://urldefense.com/v3/__https://aka.ms/LearnAboutSenderIdentification__;!!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  akohlmey_at_gmail.com  https://urldefense.com/v3/__https://goo.gl/1wk0__;!!DZ3fjg!9YhgNlIuBD0J5r1rwb20x6l83rivxaAVYFqa0DbyRlmNEIbq9vPrpf-VtvSFa12WuNec1fmAMZTv7B6bEg$ 
Institute for Computational Molecular Science and HPC, https://urldefense.com/v3/__https://icmshpc.com__;!!DZ3fjg!9YhgNlIuBD0J5r1rwb20x6l83rivxaAVYFqa0DbyRlmNEIbq9vPrpf-VtvSFa12WuNec1fmAMZRUQdYnPQ$ 
College of Science & Technology, Temple University, Philadelphia PA, USA