VMD-L Mailing List
From: Arthur Pereira da Fonseca (arthurpfonseca3k_at_hotmail.com)
Date: Sat Dec 05 2020 - 15:31:30 CST
- Next message: Axel Kohlmeyer: "Re:"
- Previous message: John Stone: "Re: [EXTERNAL]Re: h-bond plugin with QMMM"
- Next in thread: Axel Kohlmeyer: "Re:"
- Reply: Axel Kohlmeyer: "Re:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hello, I’m still learning some tcl and I'm trying to write a script in it to execute some analysis on VMD. First I'm creating an atom selection inside a procedure, then I'm trying to use it on another procedure.
When I create the atom selection outside a proc I can use it inside one just passing it as global. But now that I'm creating it inside one, when I try to use it it's just a string with the procedure name.
Resuming,
This works:
set all [atomselect top all]
proc test {} {
global all
$all num
}
test # Outuputs 7111
But this don't:
proc create {} {
global all
set all [atomselect top all]
}
proc test {} {
global all
$all num
}
test # Outputs -> invalid command name "atomselect1"
- Next message: Axel Kohlmeyer: "Re:"
- Previous message: John Stone: "Re: [EXTERNAL]Re: h-bond plugin with QMMM"
- Next in thread: Axel Kohlmeyer: "Re:"
- Reply: Axel Kohlmeyer: "Re:"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]