Ashar,
Do the same thing but in fractional coordinates, then convert back to
cartesian.
Use the information at the end of the coordinate/restart file for box
sizes and angles.
Mike
--
Michael F. Crowley, Ph.D., Principal Scientist
National Renewable Energy Laboratory
15013 Denver West Parkway, MS 3323
Golden, CO 80401
michael.crowley.nrel.gov
303-384-6345 office
303-887-0149 mobile
On 3/11/15 9:24 AM, "Arjun Sharma" <arjunsharma83.gmail.com> wrote:
>Dear Amber users,
>
>How to calculate the distance between the nearest atoms in periodic
>boundary conditions for polymer structure in truncated octahedron solvent
>box. Here is the fortran code I used for polymer in rectilinear solvent
>box, how do I modify it for truncated octahedron.
>
>xc = x(center of polymer)
>yc = y(center of polymer)
>zc = z(center of polymer)
> do i=1,natm
> x(i)=x(i)-xc
> x(i)=x(i)-bx*dnint(x(i)/bx)
> y(i)=y(i)-yc
> y(i)=y(i)-by*dnint(y(i)/by)
> z(i)=z(i)-zc
> z(i)=z(i)-bz*dnint(z(i)/bz)
>
>Any help is greatly appreciated.
>
>Thanks,
>Ashar
>_______________________________________________
>AMBER mailing list
>AMBER.ambermd.org
>http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Mar 11 2015 - 09:00:04 PDT