# Re: [AMBER] Distance between two different solvent mask

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Fri, 20 Jul 2018 10:55:14 -0400

Hi,

On Mon, Jul 16, 2018 at 6:23 AM, MOHD HOMAIDUR RAHMAN
<rahmanhpu.gmail.com> wrote:
>
> I want to calculate distance between two solvent mask closest to two end of
> a protein. For that I have define two mask, solvent A that is near to resid
> 1 and solvent B near to resid 20.

It's an interesting problem. The issue with your current strip is that
once the first 'closest' command is processed, you only have 1 water
(the one closest to :1). So when you get to the second 'closest'
command, it only has the 1 remaining water to look at. You need to do
this in two passes - in the first you need to add an 'unstrip' command
to reset the first 'closest', and save coordinates of just the closest
waters to your target residues. Then in a second pass you can combine
those coordinates and calculate the distance. Here's some input I
tested on a system I have where I determined the distance between the
closest waters to residues 1 and 12:

parm tz2.ortho.parm7
trajin tz2.ortho.nc
# Closest water to residue 1.
closest 1 :1 parmout closest.01.parm7
# This will have the water and solute, so strip the solute.
strip !:WAT
# Save coordinates of closest water to res 1
createcrd Closest01
# Reset 'closest'
unstrip
# Now closest water to residue 12
closest 1 :12
# Strip out the solute
strip !:WAT
# Save coordinates of closest water to residue 12
createcrd Closest12
# Run
run
# Combine coordinates of the two closest waters
combinecrd Closest01 Closest12 crdname Combined
# Calculate distance
crdaction Combined distance :1 :2 out distance.1.12.dat
# Uncomment to output combined trajectory for visualization if desired
#crdout Combined water.1.12.mol2

Hope this helps,

-Dan

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Jul 20 2018 - 08:00:02 PDT
Custom Search