VMD-L Mailing List
From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Fri Feb 07 2020 - 06:17:21 CST
- Next message: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Previous message: Gianfranco Abrusci: "Re: atomselect: cannot parse selection text:"
- In reply to: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Next in thread: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Reply: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello Viviane, "216" is not a valid atom selection string. Number 216 may
have been for example an atom by *index* (0-based), by *serial* number
(1-based), the *resid* number (which can occur multiple times in different
chains), the *residue* number (unique in the whole system), or the
*fragment* number, etc.
Check the doc for the atomselect command to find out how to express for VMD
the selection you have in mind.
Giacomo
On Fri, Feb 7, 2020 at 5:07 AM Viviane Corrêa <vivicorreasantos_at_gmail.com>
wrote:
> Hello John Stone,
>
> I loaded the trajectory and from the VMD TkConsole I sourced the script.
>
> Then I typed: contactFreq "protein" "216"
>
> and I got this message: atomselect: cannot parse selection text: protein
> and noh and within 4 of (216 and noh)
>
> I found the script here:
> https://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/19311.html
>
> Thanks for your help!
>
> Viviane
>
>
>
>
> Em qui., 6 de fev. de 2020 às 18:40, John Stone <johns_at_ks.uiuc.edu>
> escreveu:
>
>> Hi,
>> Okay, now we have the script, but you haven't actually asked a
>> well-formed question. Please provide as much other information that you
>> can so that someone could use it to help you.
>>
>> I assume you're having some trouble and that you're getting an
>> atom selection error. You haven't told us what steps you have done,
>> where the script came from, what kind of machine you're
>> running on, and so on.
>>
>> At the very minimum we need to see what command(s) you ran.
>> You can see that the script uses the parameters "sel1" and "sel2"
>> to create its atom selections. If you provide invalid inputs for
>> sel1 or sel2, you will definitely get an error when using that script.
>>
>> Best regards,
>> John Stone
>> vmd_at_ks.uiuc.edu
>>
>> On Thu, Feb 06, 2020 at 06:31:06PM +0100, Viviane Corrêa wrote:
>> > Now the attachment...
>> > Em qui., 6 de fev. de 2020 Ã s 18:21, John Stone <[1]
>> johns_at_ks.uiuc.edu>
>> > escreveu:
>> >
>> > Hi,
>> > Â There was no attachment on your posting.
>> > If the attachment is too big, the mailing list software will
>> remove it
>> > to prevent it from creating trouble for recipients with small
>> > mailbox storage limits.
>> >
>> > Best regards,
>> > Â John Stone
>> > Â [2]vmd_at_ks.uiuc.edu
>> >
>> > On Thu, Feb 06, 2020 at 06:13:25PM +0100, Viviane CorrÄ*a wrote:
>> > > Hi,
>> > >
>> > > I'm trying to analyze the frequency of contacts between the
>> protein
>> > and a
>> > > small molecule (residue 216). I'm using the attached script
>> > contactFreq.tcl
>> >
>> > --
>> > NIH Center for Macromolecular Modeling and Bioinformatics
>> > Beckman Institute for Advanced Science and Technology
>> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
>> > [3]http://www.ks.uiuc.edu/~johns/Â Â Â Â Â Â Phone:
>> 217-244-3349
>> > [4]http://www.ks.uiuc.edu/Research/vmd/Â Â Â
>> >
>> > --
>> > Viviane Corrêa Santos, MSc
>> > Protein Computational Biology Group
>> > Departamento de BioquÃmica e Imunologia - ICB - UFMG
>> > [5]www.biocomp.icb.ufmg.br
>> >
>> > References
>> >
>> > Visible links
>> > 1. mailto:johns_at_ks.uiuc.edu
>> > 2. mailto:vmd_at_ks.uiuc.edu
>> > 3. http://www.ks.uiuc.edu/~johns/
>> > 4. http://www.ks.uiuc.edu/Research/vmd/
>> > 5. http://www.biocomp.icb.ufmg.br/biocomp/?page_id=232
>>
>> > proc contactFreq { {sel1} {sel2} {percent 0} {outFile stdout} {mol top}
>> } {
>> > if { $outFile != "stdout" } {
>> > set outFile [open $outFile w]
>> > }
>> > puts $outFile "[clock format [clock scan now]] Search started."
>> >
>> > set allAtoms {}
>> > set allCount {}
>> > set numberOfFrames [molinfo $mol get numframes]
>> > for { set i 0 } { $i < $numberOfFrames } { incr i } {
>> > molinfo $mol set frame $i
>> >
>> > set frameCount {}
>> > set frameAtoms [atomselect $mol "$sel1 and noh and within 4 of
>> ($sel2 and noh)"]
>> > foreach {segid} [$frameAtoms get segid] {resname} [$frameAtoms
>> get resname] {resid} [$frameAtoms get resid] {name} [$frameAtoms get name] {
>> > set atom [list $resid $resname $segid]
>> > if {[lsearch $frameCount $atom] != -1} continue
>> > lappend frameCount $atom
>> > set loc [lsearch $allAtoms $atom]
>> > if { $loc == -1 } {
>> > lappend allAtoms $atom
>> > lappend allCount 1
>> > } else {
>> > lset allCount $loc [expr { [lindex $allCount $loc] + 1 } ]
>> > }
>> > }
>> > $frameAtoms delete
>> > }
>> >
>> > puts $outFile "[clock format [clock scan now]] Search finished."
>> >
>> > puts $outFile "Find interactions:"
>> > puts $outFile "Residue \t\tfraction"
>> > #print count after sorting
>> > set outData {}
>> > foreach { a } $allAtoms { c } $allCount {
>> > lappend outData [concat $c $a]
>> > }
>> > foreach { data } [lsort -integer -index 1 $outData] {
>> > set c [lindex $data 0]
>> > set fraction [expr { 100*$c/($numberOfFrames+0.0) }]
>> > if { $fraction >= $percent } {
>> > puts $outFile [format "%s-%s-%s \t\t %.2f%%" [lindex $data 3]
>> [lindex $data 2] [lindex $data 1] $fraction]
>> > }
>> > #set beta according to the fraction, this is optional
>> > set atom [atomselect $mol "segid [lindex $data 3] and resname
>> [lindex $data 2] and resid [lindex $data 1]"]
>> > $atom set beta $fraction
>> > $atom delete
>> > }
>> >
>> > if { $outFile != "stdout" } {
>> > close $outFile
>> > }
>> >
>> > }
>> >
>>
>>
>> --
>> NIH Center for Macromolecular Modeling and Bioinformatics
>> Beckman Institute for Advanced Science and Technology
>> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
>> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
>> http://www.ks.uiuc.edu/Research/vmd/
>>
>
>
> --
> Viviane Corrêa Santos, MSc
> Protein Computational Biology Group
> Departamento de Bioquímica e Imunologia - ICB - UFMG
> www.biocomp.icb.ufmg.br
> <http://www.biocomp.icb.ufmg.br/biocomp/?page_id=232>
> <http://www.biocomp.icb.ufmg.br/biocomp/?page_id=252>
>
-- Giacomo Fiorin Associate Professor of Research, Temple University, Philadelphia, PA Research collaborator, National Institutes of Health, Bethesda, MD http://goo.gl/Q3TBQU https://github.com/giacomofiorin
- Next message: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Previous message: Gianfranco Abrusci: "Re: atomselect: cannot parse selection text:"
- In reply to: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Next in thread: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Reply: Viviane Corrêa: "Re: atomselect: cannot parse selection text:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]