From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Apr 06 2022 - 09:48:56 CDT

Hi,
  Josh is correct, I haven't added new Python bindings for this command yet,
but 'evaltcl' works for this just like anything else that doesn't have a
custom Python binding.

Best,
  John

On Wed, Apr 06, 2022 at 01:04:56PM +0000, Vermaas, Josh wrote:
> Via evaltcl, almost certainly. I don't think I've seen a change in CVS to reflect fromsels existing explicitly in molecule or Molecule on the python side.
>
> -Josh
>
> ???On 4/6/22, 8:58 AM, "Dominique Mias-Lucquin" <dominique.mias-lucquin_at_loria.fr> wrote:
>
> Hi,
> does the FROMSELS command is availlable from the python binding ?
> DML.
>
> ----- Mail original -----
> > De: "John Stone" <johns_at_ks.uiuc.edu>
> > À: "yjcoshc" <yjcoshc_at_gmail.com>
> > Cc: "Josh Vermaas" <vermaasj_at_msu.edu>, "vmd-l" <vmd-l_at_ks.uiuc.edu>, "Haochuan Chen" <haochuan.chen_at_univ-lorraine.fr>
> > Envoyé: Lundi 4 Avril 2022 18:30:35
> > Objet: Re: vmd-l: VMD 1.9.4 crashes after running the "Merge Structures" plugin (with psfgen 2.0)
>
> > Hi,
> > I should also point out that there's another new way of merging molecules in
> > VMD 1.9.4 that people probably aren't aware of yet:
> > mol fromsels $selectionlist
> >
> > e.g.:
> > set sellist {}
> > lappend sellist [atomselect 2 "index 11 to 18"]
> > lappend sellist [atomselect 3 "index 20 to 30"]
> > llength $sellist
> > mol fromsels $sellist
> >
> > This bypasses any disk I/O and builds a new VMD molecule from a list of
> > VMD atom selections from existing molecule(s). It can be substantially
> > faster than other methods if the structures you've got loaded in VMD
> > contain everything you want and you just need to put them together
> > in a single molecule.
> >
> > You can of course then write the new molecule to a file if you like.
> >
> > Best,
> > John
> >
> > On Mon, Apr 04, 2022 at 11:18:41AM -0500, yjcoshc wrote:
> >> Hi Josh,
> >>
> >> Thanks for your information. I have tried VMD 1.9.3 with psfgen 1.6,
> >> which works without the segfault. The generated files look correct,
> >> so I have used them. I will try topotools if I have time.
> >>
> >> Thanks,
> >>
> >> Haochuan Chen
> >>
> >>
> >> On 4/4/22 11:15, Josh Vermaas wrote:
> >> >Hi Haochuan,
> >> >
> >> >If you are just trying to merge together two structures in a way
> >> >that doesn't segfault, I think the "mergemols" command in
> >> >topotools gives you a way around this problem. Admittedly, this is
> >> >now my default approach, so I don't know how widespread this
> >> >problem is with psfgen 2.0.
> >> >
> >> >-Josh
> >> >
> >> >On 4/4/22 11:06, yjcoshc wrote:
> >> >>Dear VMD developers,
> >> >>
> >> >>I am using the "Merge Structures" plugin in VMD 1.9.4a51, and
> >> >>after setting all the options and clicking the "Merge" button,
> >> >>VMD encounters a segmentation fault. The VMD binary is download
> >> >>from the official website. I have also tried to compile VMD from
> >> >>source with debug options, and the backtrace is attached as
> >> >>following:
> >> >>
> >> >>Thread 1 "vmd_LINUXAMD64" received signal SIGSEGV, Segmentation fault.
> >> >>0x00007fc70f04aded in __GI__IO_fflush (fp=0x46ac450) at iofflush.c:39
> >> >>39 _IO_acquire_lock (fp);
> >> >>(gdb) bt
> >> >>#0 0x00007fc70f04aded in __GI__IO_fflush (fp=0x46ac450) at
> >> >>iofflush.c:39
> >> >>#1 0x00007fc6f4ef6c82 in newhandle_msg_text
> >> >>(psfcontext=0x516c090, interp=interp_at_entry=0x4158b60,
> >> >>msg=msg_at_entry=0x7ffef16f7590 "reading topology file
> >> >>/home/hanatok/vmd/plugins/noarch/tcl/readcharmmtop1.2/top_all27_prot_lipid_na.inp\n")
> >> >>at src/tcl_psfgen.c:71
> >> >>#2 0x00007fc6f4ef6d35 in newhandle_msg
> >> >>(vdata=vdata_at_entry=0x4be8230, v=v_at_entry=0x4158b60,
> >> >>msg=msg_at_entry=0x7ffef16f7590 "reading topology file
> >> >>/home/hanatok/vmd/plugins/noarch/tcl/readcharmmtop1.2/top_all27_prot_lipid_na.inp\n")
> >> >>at src/tcl_psfgen.c:95
> >> >>#3 0x00007fc6f4ef7183 in tcl_topology (data=0x4be8230,
> >> >>interp=0x4158b60, argc=<optimized out>, argv=<optimized out>) at
> >> >>src/tcl_psfgen.c:736
> >> >>#4 0x00007fc70f8da815 in TclInvokeStringCommand () from
> >> >>/lib64/libtcl8.6.so
> >> >>#5 0x00007fc70f8dbad2 in TclNRRunCallbacks () from /lib64/libtcl8.6.so
> >> >>#6 0x00007fc70f8e200a in ?? () from /lib64/libtcl8.6.so
> >> >>#7 0x00007fc70f8e2833 in Tcl_EvalEx () from /lib64/libtcl8.6.so
> >> >>#8 0x00007fc70f8e2856 in Tcl_Eval () from /lib64/libtcl8.6.so
> >> >>#9 0x00007fc6f4ef98fd in tcl_psfcontext (data=0x4be8230,
> >> >>interp=0x4158b60, argc=<optimized out>, argv=0x415cf90) at
> >> >>src/tcl_psfgen.c:560
> >> >>#10 0x00007fc70f8da815 in TclInvokeStringCommand () from
> >> >>/lib64/libtcl8.6.so
> >> >>#11 0x00007fc70f8dbad2 in TclNRRunCallbacks () from /lib64/libtcl8.6.so
> >> >>#12 0x00007fc70f9aa1ac in ?? () from /lib64/libtcl8.6.so
> >> >>#13 0x00007fc70f9a9d97 in TclServiceIdle () from /lib64/libtcl8.6.so
> >> >>#14 0x00007fc70f98ce9c in Tcl_DoOneEvent () from /lib64/libtcl8.6.so
> >> >>#15 0x0000000000a30f09 in TclTextInterp::doTkUpdate
> >> >>(this=0x4158ac0) at TclTextInterp.C:543
> >> >>#16 0x00000000009aaecb in UIText::check_event (this=0x4156990)
> >> >>at UIText.C:186
> >> >>#17 0x0000000000894ee3 in CommandQueue::check_events
> >> >>(this=0x3a677f0) at CommandQueue.C:92
> >> >>#18 0x00000000009af65a in VMDApp::VMDupdate (this=0x3a3f030,
> >> >>check_for_events=1) at VMDApp.C:915
> >> >>#19 0x0000000000a045ef in main (argc=1, argv=0x7ffef16f8468) at
> >> >>vmdmain.C:93
> >> >>
> >> >>I suspect it may be caused by incorrect file descriptor
> >> >>psfcontext->PSFGENLOGFILE (or wild pointer) in the new psfgen
> >> >>2.0. The crash does not happen in VMD 1.9.3, which uses psfgen
> >> >>1.6. Any ideas?
> >> >>
> >> >>Thanks,
> >> >>
> >> >>Haochuan Chen
> >> >>
> >> >>
> >
> > --
> > NIH Center for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > https://urldefense.com/v3/__http://www.ks.uiuc.edu/*johns/__;fg!!HXCxUKc!gIyTEILC4BoiB3_WxAnQADruCIGB3C4Im-nI_ka0Hd3mvOfft24xb4TGgn5yxX0$ Phone: 217-244-3349
> > https://urldefense.com/v3/__http://www.ks.uiuc.edu/Research/vmd/__;!!HXCxUKc!gIyTEILC4BoiB3_WxAnQADruCIGB3C4Im-nI_ka0Hd3mvOfft24xb4TGkAgZrUY$
>

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/