Re: [AMBER] Data set math gives "size is 0"

From: Rodrigo Galindo-Murillo via AMBER <amber.ambermd.org>
Date: Thu, 22 Sep 2022 22:44:10 -0600

Hello!
In order to do operations with datasets, you need to first read the
data, so the datasets can be populated with data, and then you can
perform operations. I made a simple example for the operation you want
to do:
----------------------------------------------------------
parm nowater.topo
trajin nowater.nc 1 last 100
distance d1 :1 :10 out d1.dat
distance d2 :2 :11 out d2.dat
go
resta=d1-d2
write resta.dat resta
go
----------------------------------------------------------
Output of resta.dat:
#Frame resta
       1 -1.1309
       2 -1.4515
       3 -1.0341
       4 -1.8777
       5 0.3417
       6 -2.1835
       7 -0.2239
       8 0.4551
       9 -0.3705

This CPPTRAJ input works for my data. Read the trajectory input, and
then do any operations you are interested in.

Hope that helps!
Rodrigo

On Thu, Sep 22, 2022 at 10:03 PM Chunsheng Lin via AMBER
<amber.ambermd.org> wrote:
>
> Dear Colleagues,
>
>
> I want to calculate two bond lengths as well as their differences with cpptraj. My cpptraj.in file is as following:
> trajin a18.nc
> distance dT1_T2 .683 .684 out a18.txt
> distance dT2_T3 .684 .664 out a18.txt
> cv = dT1_T2 - dT2_T3
> write a18.txt cv
>
> However, cpptraj gives such results:
> BEGIN TRAJECTORY PROCESSING:
> .....................................................
> ACTION SETUP FOR PARM 'a18.prmtop' (2 actions):
> 0: [distance dT1_T2 .683 .684 out a18.txt]
> .683 (1 atoms) to .684 (1 atoms), imaged.
> 1: [distance dT2_T3 .684 .664 out a18.txt]
> .684 (1 atoms) to .664 (1 atoms), imaged.
> ----- a18.nc (1-6204, 1) -----
> 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Complete.
>
> Read 6204 frames and processed 6204 frames.
> TIME: Avg. throughput= 17658.8126 frames / second.
>
> ACTION OUTPUT:
> TIME: Analyses took 0.0000 seconds.
>
> DATASETS (3 total):
> dT1_T2 "dT1_T2" (double, distance), size is 6204
> dT2_T3 "dT2_T3" (double, distance), size is 6204
> cv "cv" (double), size is 0
>
> DATAFILES (1 total):
> a18.txt (Standard Data File): dT1_T2 dT2_T3
> --------------------------
> The resulted file a18.txt has only dT1_T2 and dT2_T3, and no cv. What is the problem? Why the data set math result "cv" size is 0?
>
>
> Best regards,
> Chunsheng
>
> _______________________________________________
> 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 Thu Sep 22 2022 - 22:00:03 PDT
Custom Search