Re: colvars selecting frames

From: Stefano Guglielmo (stefano.guglielmo_at_unito.it)
Date: Thu Feb 01 2018 - 06:06:41 CST

Jerome, thanks for hint.
I must say that I'm far from being expert in scripting; I tried the
following one, but it just write one frame in the output dcd file. Is
somebody that patient to provide some more suggestions?

Thanks in advance
Stefano

package require bigdcd
proc metadynamics_colvars { frame } {
     global all
     if {$frame == 1} {
     cv molid 0
     cv configfile colvar4.txt
     cv load cdk_8bS_cv4_replica1_250.restart
}
     cv update
      set energy [cv bias metadynamics1 energy]
      set dist [cv colvar Dist value]
      set sel [atomselect top all]
      set n [molinfo top get numframes]
      #set ang [cv colvar angle value]
      if { $dist > 15 } {
     if { $energy > 8 } {
            for { set i 0 } { $i < $n } { incr i } {
  $sel frame $i
  $sel update
  animate write dcd cdk2_8bS_min.dcd $sel
        }
            }
          }
 }
 set mol [mol new cdk2_8bS_pocket_wb_ion.psf type psf waitfor all]
 set all [atomselect $mol all]
 $all global
 bigdcd metadynamics_colvars auto cdk_8bS_cv4_210.dcd
 bigdcd_wait
 quit

2018-01-31 10:22 GMT+01:00 Jérôme Hénin <jerome.henin_at_ibpc.fr>:

> Dear Stefano,
>
> You can do that with a VMD script using the colvars interface.
>
> Best,
> Jerome
>
> On 31 January 2018 at 02:37, Stefano Guglielmo <stefano.guglielmo_at_unito.it
> > wrote:
>
>> Dear all,
>> I was wondering if it is possible to select and ouput/save frames having
>> collective variable values in a user defined range (or in alternative
>> metadynamics energy value) out of a metadynamics trajectory obtained with
>> the colvars module in NAMD.
>> Thanks in advance
>> Stefano
>>
>> --
>> Stefano GUGLIELMO PhD
>> Assistant Professor of Medicinal Chemistry
>> Department of Drug Science and Technology
>> Via P. Giuria 9
>> <https://maps.google.com/?q=Via+P.+Giuria+9+10125+Turin,+ITALY+ph.+%2B39&entry=gmail&source=g>
>> 10125 Turin, ITALY
>> <https://maps.google.com/?q=Via+P.+Giuria+9+10125+Turin,+ITALY+ph.+%2B39&entry=gmail&source=g>
>> ph. +39
>> <https://maps.google.com/?q=Via+P.+Giuria+9+10125+Turin,+ITALY+ph.+%2B39&entry=gmail&source=g>
>> (0)11 6707178
>>
>>
>

-- 
Stefano GUGLIELMO PhD
Assistant Professor of Medicinal Chemistry
Department of Drug Science and Technology
Via P. Giuria 9
10125 Turin, ITALY
ph. +39 (0)11 6707178

This archive was generated by hypermail 2.1.6 : Mon Nov 18 2019 - 23:19:32 CST