From: CHARLES MCCALLUM (cmccallum_at_me.com)
Date: Tue Apr 23 2024 - 14:04:23 CDT

I understand my mistake now. I think the documentation could be more clear.
Thanks to all who responded!

Mike

> On Apr 22, 2024, at 11:33 AM, Diego Gomes <diego.enry_at_gmail.com> wrote:
>
> Thank you for the reply Roni, I made the same mistake as Charles.
> I'll make sure to revisit the user guide to clarify that option.
>
> Here's a similar script with a few more comments.
>
> # Load new topology for mol1
> set mol1 [mol new ../base/protein.psf]
>
> # Load new topology for mol1
> set mol2 [mol new ../base/protein.psf]
>
> # Confirm their "ID" numbers
> puts "Mol1: $mol1 Mol2: $mol2"
>
> # Add trajectory to mol1
> mol addfile trajectories/run.1.dcd waitfor all $mol1
>
> # Add trajectory to mol2
> mol addfile trajectories/run.2.dcd waitfor all $mol2
>
>
>
> On Fri, Apr 19, 2024 at 10:45 PM Roni Saiba <ronis_at_imsc.res.in <mailto:ronis_at_imsc.res.in>> wrote:
>> Hi,
>>
>> molid is not a command. You have to put the specific molecule number
>> instead of "molid $sel". The modified script may look something like
>> this:
>>
>> Quoting CHARLES MCCALLUM <cmccallum_at_me.com <mailto:cmccallum_at_me.com>>:
>> set velid [mol new file.psf]
>> set trajid [mol new file.psf]
>> set molnum2 [molinfo index $trajid]
>> mol addfile file.dcd type dcd waitfor all $trajid
>>
>> Regards,
>> Roni
>>
>> > We are trying to do an analysis in a tcl script, and I’m a bit
>> > confused as to how VMD acts versus how the VMD tcl command
>> > documentation suggests. I want to load the veldcd and regular dcd
>> > into two separate molids, but with the same psf:
>> >
>> > set velid [mol new file.psf] ;# molid “0” for example
>> > set trajid [mol new file.psf];# molid “1” for example
>> > mol addfile file.veldcd type dcd waitfor all molid $velid
>> > mol addfile file.dcd type dcd waitfor all molid $trajid
>> >
>> > I would expect that adding the ‘molid $velid’ forces the veldcd to
>> > to into the molid 0, that is, the velocity dcd. But it always adds
>> > into the second molid (the top molid).
>> >
>> > We work around this by always ‘mol addfile…’ after each new molid
>> > while it is the top:
>> >
>> > set velid [mol new file.psf] ;# molid “0” for example
>> > mol addfile file.veldcd type dcd waitfor all molid $velid
>> > set trajid [mol new file.psf];# molid “1” for example
>> > mol addfile file.dcd type dcd waitfor all molid $trajid
>> >
>> > Or, we can explicitly set whichever one we want as the top with ‘mol
>> > top $velid’. But it makes me wonder why it doesn’t work in the
>> > first set of commands; the ‘molid $velid’ seems to be ignored. We
>> > have tried this with actual numbers instead of variables. In other
>> > words, the variables representing the molids are being set
>> > correctly. When I make selections for the calculation later on,
>> > setting the molid that I want (velocities or coordinates) works as
>> > expected with ‘atomselect’. Clearly I’m missing something here.
>> >
>> > Thanks
>> > Mike
>> >
>> > --
>> > C. Michael McCallum
>> > Professor
>> > Department of Chemistry, UOP
>> > mmccallum .at. pacific .dot. edu (209) 946-2636 v /
>> > (209) 946-2607 fax
>>
>>
>>
>
>
> --
> Diego Enry B. Gomes, PhD
> Department of Physics at Auburn University &
> NIH Center for Macromolecular Modeling and Visualization
> Leach Science Center - Ste. 3182 - Auburn, AL
> dgomes_at_auburn.edu <mailto:dgomes_at_auburn.edu>

--
Mike McCallum
Morada/Stockton CA, USA
cmccallum at me ^dot^ com