From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Sep 25 2023 - 17:14:53 CDT

On macOS things are always a bit different.
Your setting of $PATH is quite useless.

I have been able to reproduce what you are seeing and have found a
workaround/fix.

As I already suspected, the problem is due to a piece of Tcl code that does
not take into account that paths may have blanks.
This code in in the file /Applications/VMD\
1.9.4a57-x86_64-Rev12.app/Contents/vmd/plugins/MACOSXX86_64/tcl/cionize1.0/cionize.tcl

In the function ::cionize::run_cionize on line 249 you have:

eval ::ExecTool::exec "$env(CIONIZEBINDIR)/cionize" -i $inputfile -m
$runtype -p $nprocs $tmpname.pqr >&@ stdout

This must be changed into:

eval ::ExecTool::exec {$env(CIONIZEBINDIR)/cionize} -i $inputfile -m
$runtype -p $nprocs $tmpname.pqr >&@ stdout

Furthermore, you need to copy a file:

cp /Applications/VMD\ 1.9.4a57-x86_64-Rev12.app/Contents/vmd/libnetcdf.dylib
/Applications/VMD\
1.9.4a57-x86_64-Rev12.app/Contents/vmd/plugins/MACOSXX86_64/bin/cionize1.0/

Then you start vmd in GUI mode from the Applications folder. You must not
start the VMD executable directly, because then the environment is not
properly set up.
in the VMD console, you can now change to the directory where you have your
cionize.tcl script with "cd".
You can verify that you are in the correct folder by typing "pwd" and/or
"ls"

Then you use the command:

play cionize.tcl

This should run cionize as expected. It did for me.

On Mon, Sep 25, 2023 at 5:25 PM Ropón-Palacios G. <groponp_at_gmail.com> wrote:

> I apologize for the omission of the detail: 1) I have exported as follows
> the PATH of VMD from my zshrc (MacOS Big Sur): export PATH=
> /Applications/VMD\ 1.9.4a57-x86_64-Rev12.app/Contents/vmd:$PATH
>
> , 2) the command I use is the following:vmd_MACOSXX86_64 -dispdev text -e
> cionize.tcl
>
> 3) my script contains the following lines:
> package require cionize
> namespace import ::cionize::*
> set id [mol new ../tmp_top.psf type psf waitfor all]
> mol addfile ../tmp_top.pdb type pdb waitfor all
>
> #! Run with a suffcient number of ions to saturate the model
> #! This example estimates 3x magnitude of system net charge
> set charge [expr {round([vecsum [[atomselect top "all"] get charge]])}]
> set number [expr {abs($charge*3)}] ; # 3x magnitude of system net charge
> #! np is the number of procs
> cionize -mol $id -np 4 -mg -ions "{SOD $number 1} {CLA $number -1}"
> #mol delete all
>
> Error:
>
> Starting cionize...
> pqrplugin) Warning no atom radii available, assigning radii of 1.0
> Info) Opened coordinate file cionize-temp.pqr for writing.
> Info) Finished with coordinate file cionize-temp.pqr.
> couldn't find program `/Applications/VMD'
>
> On Monday, Sep 25, 2023 at 6:04 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
> wrote:
> You are not making any sense here and making it extremely difficult to
> give some meaningful advice.
>
> You have to explain in more detail what exactly you did; how and where you
> typed what command and in which order.
> Also, you are not consistent, because what you quoted here is different
> from what you quoted before.
>
>
> On Mon, Sep 25, 2023 at 4:59 PM Ropón-Palacios G. <groponp_at_gmail.com>
> wrote:
>
>> I’m using:
>>
>> export PATH="/Applications/VMD\ 1.9.4a57-x86_64-Rev12.app/Contents/vmd:
>> $PATH”
>>
>> To fix the error, but donot fix any way for fix it?
>>
>> it error only get when cionize, for other plugin it work fine
>>
>>
>> geo.
>>
>>
>>
>> On Monday, Sep 25, 2023 at 5:49 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>> wrote:
>> This looks a lot like you are using a Tcl script that does not take into
>> account that path names may contain a blank.
>> This more commonly happens on Windows, but obviously applies to your case
>> as well.
>> The equivalent path on your Linux machine probably does not have a blank.
>>
>>
>> On Mon, Sep 25, 2023 at 4:35 PM Ropón-Palacios G. <groponp_at_gmail.com>
>> wrote:
>>
>>> Dear,
>>>
>>> try export all paths, possible from APP vmd :
>>>
>>> export PATH="/Applications//Applications/VMD
>>> 1.9.4a57-x86_64-Rev12.app/Contents:$PATH"
>>> export PATH="/Applications//Applications/VMD
>>> 1.9.4a57-x86_64-Rev12.app/Contents/vmd:$PATH"
>>>
>>> bet following get again following error:
>>>
>>> Starting cionize...
>>> pqrplugin) Warning no atom radii available, assigning radii of 1.0
>>> Info) Opened coordinate file cionize-temp.pqr for writing.
>>> Info) Finished with coordinate file cionize-temp.pqr.
>>> couldn't find program `/Applications/VMD’
>>>
>>> how can fix it?
>>>
>>> best,
>>>
>>> Geo.
>>>
>>>
>>> On Monday, Sep 25, 2023 at 3:49 AM, Castro Martinez Camila <
>>> camila.castro_at_tu-dortmund.de> wrote:
>>>
>>> Did you add vmd into the path in your macOS?
>>>
>>>
>>> Camila
>>> ------------------------------
>>> *De:* owner-vmd-l_at_ks.uiuc.edu <owner-vmd-l_at_ks.uiuc.edu> en nombre de
>>> ROPÓN-PALACIOS G. G. <groponp_at_gmail.com>
>>> *Enviado:* domingo, 24 de septiembre de 2023 13:57:26
>>> *Para:* VMD Mailing List
>>> *Asunto:* vmd-l: <<cionize on macOS error>>
>>>
>>> Dear all, I’m using cionize on my MacOS con last version of VMD (with
>>> bug fixed to OS big surf on 2022) , then I use cionize :
>>>
>>> As document into the protocol of Juan R. Perilla,
>>> https://urldefense.com/v3/__https://link.springer.com/protocol/10.1007/978-1-4939-7756-7_13__;!!DZ3fjg!5Hq0n9430AJGjSJpTCOoFBc9C7UGURSz1sEPDrnwczbxvJaE-xdcSspSBr5DjdcB5zKVAytPW5NO44ok6Q$
>>> <https://urldefense.com/v3/__https://link.springer.com/protocol/10.1007/978-1-4939-7756-7_13__;!!DZ3fjg!_j39KWGxQzwPpvfsCFoxxiVS_IrO54Gt8mxBLAsi57oaQdQVuhemguHYHvQ1hIePyKnqPKBnWBTJoVUW$>
>>>
>>> But get the following error : Couldn’t find /Application/VMD
>>>
>>> It only into macOS because into Linux running normal,
>>>
>>> Help me please,
>>>
>>> Best,
>>>
>>> Geo
>>>
>>> Enviado de Outlook para iOS
>>> <https://urldefense.com/v3/__https://aka.ms/o0ukef__;!!DZ3fjg!_j39KWGxQzwPpvfsCFoxxiVS_IrO54Gt8mxBLAsi57oaQdQVuhemguHYHvQ1hIePyKnqPKBnWB74AGMQ$>
>>>
>>>
>>>
>>>
>>> *Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich.
>>> Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der
>>> für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den
>>> Absender und vernichten Sie diese Mail. Vielen Dank. Unbeschadet der
>>> Korrespondenz per E-Mail, sind unsere Erklärungen ausschließlich final
>>> rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger
>>> Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per
>>> Telefax erfolgen. Important note: The information included in this e-mail
>>> is confidential. It is solely intended for the recipient. If you are not
>>> the intended recipient of this e-mail please contact the sender and delete
>>> this message. Thank you. Without prejudice of e-mail correspondence, our
>>> statements are only legally binding when they are made in the conventional
>>> written form (with personal signature) or when such documents are sent by
>>> fax. *
>>>
>>>
>>
>> --
>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!5Hq0n9430AJGjSJpTCOoFBc9C7UGURSz1sEPDrnwczbxvJaE-xdcSspSBr5DjdcB5zKVAytPW5MroHhF6Q$
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>>
>>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!5Hq0n9430AJGjSJpTCOoFBc9C7UGURSz1sEPDrnwczbxvJaE-xdcSspSBr5DjdcB5zKVAytPW5MroHhF6Q$
> College of Science & Technology, Temple University, Philadelphia PA, USA
>
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  https://urldefense.com/v3/__http://goo.gl/1wk0__;!!DZ3fjg!5Hq0n9430AJGjSJpTCOoFBc9C7UGURSz1sEPDrnwczbxvJaE-xdcSspSBr5DjdcB5zKVAytPW5MroHhF6Q$ 
College of Science & Technology, Temple University, Philadelphia PA, USA