From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Jun 14 2017 - 05:53:26 CDT

On Wed, Jun 14, 2017 at 6:45 AM, János Szövérfi <johhnnyblack_at_gmail.com>
wrote:

> I tried in this way too, don't works.
>
> part of the tcl script:
>
> #!/bin/env wish
> ...
> package require cgtools
>

​cgtools != cgnetworking​

> ::cgnetworking::networkCGMolecule puts 0 BAR A cg_monomer.pdb
> aa_ref_monomer.pdb cg_monomer.top cg_monomer.par 10 2000 0.3 0.05 1.0 0.01
> 1 10.0 -1
> ...
>
> vmd console output
>
> 1.2
> invalid command name "::cgnetworking::networkCGMolecule"
> Info) Using plugin pdb for structure file cg_monomer.pdb
> Info) Using plugin pdb for coordinates from file cg_monomer.pdb
> Info) Determining bond structure from distance search ...
>
>
>
> 2017-06-14 13:31 GMT+03:00 Axel Kohlmeyer <akohlmey_at_gmail.com>:
>
>>
>>
>> On Wed, Jun 14, 2017 at 5:58 AM, János Szövérfi <johhnnyblack_at_gmail.com>
>> wrote:
>>
>>> I ran the script with
>>>
>>> vmd -dispdev text -e vmd_script.tcl
>>>
>>> from the script.sh and the error invalid command name "::cgnetworking::
>>> networkCGMolecule" is displayed in vmd.
>>>
>>> I think that vmd cant read the whole
>>> ::cgnetworking::networkCGMolecule puts 0 BAR A cg_monomer.pdb
>>> aa_ref_monomer.pdb cg_monomer.top cg_monomer.par 15 3000 0.3 0.05 1.0 0.01
>>> 1 10.0 -1
>>> command, only what's in front of puts
>>>
>>
>> ​no. the command is part of a package and you probably have not
>> "activated" that plugin with the "package require" command.
>> this kind of issue often doesn't show ​when running VMD in graphical
>> mode, as most plugin packages are "required" during initializing of the GUI
>> extensions.
>>
>> axel.
>>
>>
>>
>>
>>>
>>> 2017-06-14 12:50 GMT+03:00 Fotis Baltoumas <fbaltoumas_at_biol.uoa.gr>:
>>>
>>>> Hello,
>>>>
>>>> This may sound a bit stupid but, are you actually calling the vmd
>>>> executable in your bash script? CGnetworking, as well as all other vmd
>>>> commands are not part of the standard Tcl packages, they work only through
>>>> vmd itself.
>>>> I would suggest you should include in your script the following:
>>>>
>>>> vmd -dispdev text -e script.tcl
>>>>
>>>> and put the ::cgnetworking:: command and its arguments inside
>>>> script.tcl.
>>>>
>>>> Hope I helped,
>>>> Fotis
>>>>
>>>>
>>>> On 06/14/2017 11:26 AM, János Szövérfi wrote:
>>>>
>>>> Hi!
>>>>
>>>> I'm writing a bash script which executes a vmd/tcl script.
>>>> My problem is that i want to execute the CG builder within the script :
>>>>
>>>> "#!/bin/env wish
>>>> .....
>>>> ::cgnetworking::networkCGMolecule puts 0 BAR A cg_monomer.pdb
>>>> aa_ref_monomer.pdb cg_monomer.top cg_monomer.par 15 3000 0.3 0.05 1.0 0.01
>>>> 1 10.0 -1
>>>> ...."
>>>>
>>>> However when I run the script it doesn't recognize the command: invalid
>>>> command name "::cgnetworking::networkCGMolecule"
>>>>
>>>> I think that the problem is the "puts" command, which is also tcl
>>>> command.
>>>>
>>>> Is there a way to escape the puts or what could be the solution?
>>>>
>>>> Thanks
>>>>
>>>>
>>>>
>>>> --
>>>> *******************************************
>>>> Fotis A. Baltoumas
>>>> Phd Candidate, Bioinformatics Postgraduate Programme
>>>> Department of Cell Biology and Biophysics
>>>> Faculty of Biology, University of Athens
>>>> Panepistimiopolis, Athens 157 01, GREECE
>>>> --------------------------------------
>>>>
>>>> email : fbaltoumas_at_biol.uoa.grhttp://biophysics.biol.uoa.grhttp://bioinformatics.biol.uoa.gr
>>>> *******************************************
>>>>
>>>>
>>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>> International Centre for Theoretical Physics, Trieste. Italy.
>>
>
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.