From: Salvatore Mario Cosseddu (S.M.Cosseddu_at_warwick.ac.uk)
Date: Mon Dec 19 2011 - 14:27:53 CST

Thank you,

but, how may I write a tcl script that create and delete object when I
push the button play?

I can imagine that if I need to render it, I can write something like

for {set frame 0} {$frame < $n_frame} {incr frame} {

$A frame $frame
$B frame $frame

#deleting bonds
foreach i $bonds {graphics delete $i}

set bonds {}

foreach 1st_atomcoord [$A get {x y x}] {
     foreach 2st_atomcoord[$B get {x y x}] {
         lappend bonds [graphics $molID $1st_atomcoord$2st_atomcoord]
     }
}

}

But how can I update them during interactive play?

Many thanks
Salvatore

On 19/12/11 18:08, Axel Kohlmeyer wrote:
> On Mon, Dec 19, 2011 at 11:44 AM, Salvatore Mario Cosseddu
> <S.M.Cosseddu_at_warwick.ac.uk> wrote:
>> Dear all,
>>
>> The drawing method DynamicBonds draws bonds according to a cutoff.
>>
>> Let's say I have in my system the species A, B. I want to draw the bonds
>> A-B, but I don't want B-B or A-A (even if it happens their distances are
>> within the cutoff). What is the most clean way to do it.
> that is currently impossible with the DynamicsBonds representation.
>
> the only way to achieve this would be to write a Tcl procedure
> to set/delete bonds manually. not trivial, but doable. it may be
> a bit slow, if you have a lot of bonds that need to be drawn/deleted.
>
> cheers,
> axel.
>
>
>
>> Many thanks for your help
>> Salvatore
>>
>> --
>> Salvatore Cosseddu
>> PhD student
>>
>> Centre for Scientific Computing and School of Engineering
>> University of Warwick
>> Coventry CV4 7AL
>> United Kingdom
>>
>> email: S.M.Cosseddu_at_warwick.ac.uk
>
>

-- 
Salvatore Cosseddu
PhD student
Centre for Scientific Computing and School of Engineering
University of Warwick
Coventry CV4 7AL
United Kingdom
email: S.M.Cosseddu_at_warwick.ac.uk