From: Hemanth Vemuri (
Date: Wed Jun 21 2017 - 14:08:08 CDT

I ran a simulation in namd with periodic boundary conditions and my goal
was to select all the water molecules with a certain distance of the
protein so i used pbwithin(1) to determine this , however if i ran pbc wrap
command(1) in the tk console and then use within to determine the number of
water molecules i am getting a different number with large variations from
the earlier selection.
Shouldn't both the selections give close numbers if not equal number of
water molecules ?
Also it would be appreciated if you could tell me how exactly does pbwithin
and pbc wrap work.

1->(water and oxygen) and (pbwithin 3.5 of (protein and not hydrogen)) and
(not pbwithin 3 of ((water and oxygen) and not pbwithin 3.5 of (protein and
not hydrogen)))
2-> (pbc wrap -centersel "protein" -sel "water" -center com -all)

Thanks for advice ,
Hemanth Vemuri,
undergraduate student
Center for Computational Natural Sciences and Bioinformatics,International
Institute of Information Technology,
Gachibowli, Hyderabad 500 032
Telangana, India