Hi,
On Mon, Nov 25, 2024 at 4:13 PM Jing Qu via AMBER <amber.ambermd.org> wrote:
>
> Hi all,
>
> Firstly I have four atoms, to define two vectors, and I need to get the
> average vector of these two.
This is fairly straightforward in cpptraj. First generate the vector
data sets, then add them and divide by two.
parm myparm.parm7
trajin mytraj.nc
vector v1 <mask1> <mask2>
vector v2 <mask3> <mask4>
run
v1v2 = v1 + v2
v1v2avg = v1v2 / 2
writedata v1v2avg.dat v1v2avg
> And then I need to get the plane perpendicular
> to this average vector. Then I have three atoms, to define an angle (or two
> vectors). The actual parameter I want is this angle projected on the plane
> which I mentioned previously. What commands and approaches should I use to
> do this? I'm using cpptraj on Amber.
Maybe I'm not understanding what you mean, but getting a plane
perpendicular to a vector doesn't make sense. You need at least 3
points to define a plane. You can either get a vector that is
perpendicular to a plane that is defined by points with 'vector
corrplane', or you can get the vector perpendicular to two vectors via
the cross product with 'vectormath crossproduct' - maybe you want to
do one of those two?
-Dan
>
> Thanks,
> Jing
> _______________________________________________
> 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 Nov 27 2024 - 06:00:14 PST