Hi, Rick, when I run this program, it gave me error message as "Found 1201 unique water RESIDs, foreach: Too many arguments". When I cut the trajectory into two halves, and ran each piece one after another, it worked. That is why I suspected some kind of size limitation involved.