From: Noel O'B. <bao...@gm...> - 2009-10-06 11:04:51
|
I know that it's possible to play around with Avogadro from the Python terminal *in* Avogadro, but is it possible to control Avogadro from a Python script running at the Windows command prompt (for example). - Noel |
From: Geoffrey H. <ge...@ge...> - 2009-10-06 11:25:58
|
On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: > Is it possible to control Avogadro from a > Python script running at the Windows command prompt It's possible to embed Avogadro in a Python script. But no, at the moment, Avogadro does not accept "signals" or external commands from other processes. I'm not even sure if that would be secure. Cheers, -Geoff |
From: Karol M. L. <kar...@gm...> - 2009-10-06 11:30:09
|
On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: > On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: > > Is it possible to control Avogadro from a > > Python script running at the Windows command prompt > > It's possible to embed Avogadro in a Python script. But no, at the > moment, Avogadro does not accept "signals" or external commands from > other processes. I'm not even sure if that would be secure. > > Cheers, > -Geoff Maybe it's worthwhile to think about. That would be so useful... -- written by Karol Langner Tue Oct 6 13:19:44 CEST 2009 |
From: Noel O'B. <bao...@gm...> - 2009-10-06 12:22:13
|
2009/10/6 Karol M. Langner <kar...@gm...>: > On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: >> On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: >> > Is it possible to control Avogadro from a >> > Python script running at the Windows command prompt >> >> It's possible to embed Avogadro in a Python script. But no, at the >> moment, Avogadro does not accept "signals" or external commands from >> other processes. I'm not even sure if that would be secure. >> >> Cheers, >> -Geoff > > Maybe it's worthwhile to think about. That would be so useful... >From a user's perspective, there are two ways to go. Either "import avogadro; avogadro.startgui(); avogadro.display(myOBMol)" or as am currently doing with pymol (you need to start it with the -R option) "import xmlrpclib; s = xmlrpclib.Server("http://localhost:9123"); s.loadfile("myfile")" - Noel |
From: Marcus D. H. <ma...@cr...> - 2009-10-06 12:41:16
|
Noel O'Boyle wrote: > 2009/10/6 Karol M. Langner <kar...@gm...>: > >> On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: >> >>> On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: >>> >>>> Is it possible to control Avogadro from a >>>> Python script running at the Windows command prompt >>>> >>> It's possible to embed Avogadro in a Python script. But no, at the >>> moment, Avogadro does not accept "signals" or external commands from >>> other processes. I'm not even sure if that would be secure. >>> >>> Cheers, >>> -Geoff >>> >> Maybe it's worthwhile to think about. That would be so useful... >> > > >From a user's perspective, there are two ways to go. Either "import > avogadro; avogadro.startgui(); avogadro.display(myOBMol)" or as am > currently doing with pymol (you need to start it with the -R option) > "import xmlrpclib; s = xmlrpclib.Server("http://localhost:9123"); > s.loadfile("myfile")" > > - Noel > I think that the first approach is the one which works now (or did). This is also the approach used in applications with similar Python bindings such as VTK and ParaView. You use the embedded interpreter to manipulate the application, or start a new instance from a shell. The second approach would be interesting, but would need some work to set up a server. Are there many use cases not satisfied by starting a new instance of Avogadro from a shell (or more likely, the GLWidget), and if users want the full application too then use the embedded interpreter? Marcus |
From: Noel O'B. <bao...@gm...> - 2009-10-06 13:01:34
|
2009/10/6 Marcus D. Hanwell <ma...@cr...>: > Noel O'Boyle wrote: >> 2009/10/6 Karol M. Langner <kar...@gm...>: >> >>> On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: >>> >>>> On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: >>>> >>>>> Is it possible to control Avogadro from a >>>>> Python script running at the Windows command prompt >>>>> >>>> It's possible to embed Avogadro in a Python script. But no, at the >>>> moment, Avogadro does not accept "signals" or external commands from >>>> other processes. I'm not even sure if that would be secure. >>>> >>>> Cheers, >>>> -Geoff >>>> >>> Maybe it's worthwhile to think about. That would be so useful... >>> >> >> >From a user's perspective, there are two ways to go. Either "import >> avogadro; avogadro.startgui(); avogadro.display(myOBMol)" or as am >> currently doing with pymol (you need to start it with the -R option) >> "import xmlrpclib; s = xmlrpclib.Server("http://localhost:9123"); >> s.loadfile("myfile")" >> >> - Noel >> > I think that the first approach is the one which works now (or did). > This is also the approach used in applications with similar Python > bindings such as VTK and ParaView. You use the embedded interpreter to > manipulate the application, or start a new instance from a shell. Is there any working example of this? This would solve my problem. > The second approach would be interesting, but would need some work to > set up a server. Are there many use cases not satisfied by starting a > new instance of Avogadro from a shell (or more likely, the GLWidget), > and if users want the full application too then use the embedded > interpreter? I don't need this, but it would provide a way to interface with Avogadro from other languages, e.g. Java. > Marcus > |
From: Tim V. <tim...@gm...> - 2009-10-06 14:30:50
|
On Tue, Oct 6, 2009 at 3:01 PM, Noel O'Boyle <bao...@gm...> wrote: > 2009/10/6 Marcus D. Hanwell <ma...@cr...>: >> Noel O'Boyle wrote: >>> 2009/10/6 Karol M. Langner <kar...@gm...>: >>> >>>> On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: >>>> >>>>> On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: >>>>> >>>>>> Is it possible to control Avogadro from a >>>>>> Python script running at the Windows command prompt >>>>>> >>>>> It's possible to embed Avogadro in a Python script. But no, at the >>>>> moment, Avogadro does not accept "signals" or external commands from >>>>> other processes. I'm not even sure if that would be secure. >>>>> >>>>> Cheers, >>>>> -Geoff >>>>> >>>> Maybe it's worthwhile to think about. That would be so useful... >>>> >>> >>> >From a user's perspective, there are two ways to go. Either "import >>> avogadro; avogadro.startgui(); avogadro.display(myOBMol)" or as am >>> currently doing with pymol (you need to start it with the -R option) >>> "import xmlrpclib; s = xmlrpclib.Server("http://localhost:9123"); >>> s.loadfile("myfile")" >>> >>> - Noel >>> >> I think that the first approach is the one which works now (or did). >> This is also the approach used in applications with similar Python >> bindings such as VTK and ParaView. You use the embedded interpreter to >> manipulate the application, or start a new instance from a shell. > > Is there any working example of this? This would solve my problem. These are the files from the example on my blog: http://timvdm.blogspot.com/2009/05/using-avogadro-library-from-python.html standalone.py: http://pastebin.com/f31262712 mainwindow.ui: http://pastebin.com/f5fefc48f Tim >> The second approach would be interesting, but would need some work to >> set up a server. Are there many use cases not satisfied by starting a >> new instance of Avogadro from a shell (or more likely, the GLWidget), >> and if users want the full application too then use the embedded >> interpreter? > > I don't need this, but it would provide a way to interface with > Avogadro from other languages, e.g. Java. > >> Marcus >> > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Avogadro-Discuss mailing list > Avo...@li... > https://lists.sourceforge.net/lists/listinfo/avogadro-discuss > |
From: Noel O'B. <bao...@gm...> - 2009-10-09 10:35:40
|
I couldn't get Tim's UI to work on Windows. This may be because rather than using the binary releases of PyQt4 and Python, Avogadro compiles everything itself. That seems to rule out using Avogadro externally from Python. - Noel 2009/10/6 Tim Vandermeersch <tim...@gm...>: > On Tue, Oct 6, 2009 at 3:01 PM, Noel O'Boyle <bao...@gm...> wrote: >> 2009/10/6 Marcus D. Hanwell <ma...@cr...>: >>> Noel O'Boyle wrote: >>>> 2009/10/6 Karol M. Langner <kar...@gm...>: >>>> >>>>> On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: >>>>> >>>>>> On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: >>>>>> >>>>>>> Is it possible to control Avogadro from a >>>>>>> Python script running at the Windows command prompt >>>>>>> >>>>>> It's possible to embed Avogadro in a Python script. But no, at the >>>>>> moment, Avogadro does not accept "signals" or external commands from >>>>>> other processes. I'm not even sure if that would be secure. >>>>>> >>>>>> Cheers, >>>>>> -Geoff >>>>>> >>>>> Maybe it's worthwhile to think about. That would be so useful... >>>>> >>>> >>>> >From a user's perspective, there are two ways to go. Either "import >>>> avogadro; avogadro.startgui(); avogadro.display(myOBMol)" or as am >>>> currently doing with pymol (you need to start it with the -R option) >>>> "import xmlrpclib; s = xmlrpclib.Server("http://localhost:9123"); >>>> s.loadfile("myfile")" >>>> >>>> - Noel >>>> >>> I think that the first approach is the one which works now (or did). >>> This is also the approach used in applications with similar Python >>> bindings such as VTK and ParaView. You use the embedded interpreter to >>> manipulate the application, or start a new instance from a shell. >> >> Is there any working example of this? This would solve my problem. > > These are the files from the example on my blog: > http://timvdm.blogspot.com/2009/05/using-avogadro-library-from-python.html > > standalone.py: http://pastebin.com/f31262712 > mainwindow.ui: http://pastebin.com/f5fefc48f > > Tim > >>> The second approach would be interesting, but would need some work to >>> set up a server. Are there many use cases not satisfied by starting a >>> new instance of Avogadro from a shell (or more likely, the GLWidget), >>> and if users want the full application too then use the embedded >>> interpreter? >> >> I don't need this, but it would provide a way to interface with >> Avogadro from other languages, e.g. Java. >> >>> Marcus >>> >> >> ------------------------------------------------------------------------------ >> Come build with us! The BlackBerry® Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9-12, 2009. Register now! >> http://p.sf.net/sfu/devconf >> _______________________________________________ >> Avogadro-Discuss mailing list >> Avo...@li... >> https://lists.sourceforge.net/lists/listinfo/avogadro-discuss >> > |
From: Tim V. <tim...@gm...> - 2009-10-17 13:17:44
|
On Fri, Oct 9, 2009 at 12:35 PM, Noel O'Boyle <bao...@gm...> wrote: > I couldn't get Tim's UI to work on Windows. This may be because rather > than using the binary releases of PyQt4 and Python, Avogadro compiles > everything itself. That seems to rule out using Avogadro externally > from Python. I could include the python interpretor in the package. This would at least allow you to use python + PyQt + numpy + avogadro. Additional packages could still be installed to the avogadro directory. Tim > - Noel > > 2009/10/6 Tim Vandermeersch <tim...@gm...>: >> On Tue, Oct 6, 2009 at 3:01 PM, Noel O'Boyle <bao...@gm...> wrote: >>> 2009/10/6 Marcus D. Hanwell <ma...@cr...>: >>>> Noel O'Boyle wrote: >>>>> 2009/10/6 Karol M. Langner <kar...@gm...>: >>>>> >>>>>> On Tuesday 06 October 2009 13:25:46 Geoffrey Hutchison wrote: >>>>>> >>>>>>> On Oct 6, 2009, at 7:04 AM, Noel O'Boyle wrote: >>>>>>> >>>>>>>> Is it possible to control Avogadro from a >>>>>>>> Python script running at the Windows command prompt >>>>>>>> >>>>>>> It's possible to embed Avogadro in a Python script. But no, at the >>>>>>> moment, Avogadro does not accept "signals" or external commands from >>>>>>> other processes. I'm not even sure if that would be secure. >>>>>>> >>>>>>> Cheers, >>>>>>> -Geoff >>>>>>> >>>>>> Maybe it's worthwhile to think about. That would be so useful... >>>>>> >>>>> >>>>> >From a user's perspective, there are two ways to go. Either "import >>>>> avogadro; avogadro.startgui(); avogadro.display(myOBMol)" or as am >>>>> currently doing with pymol (you need to start it with the -R option) >>>>> "import xmlrpclib; s = xmlrpclib.Server("http://localhost:9123"); >>>>> s.loadfile("myfile")" >>>>> >>>>> - Noel >>>>> >>>> I think that the first approach is the one which works now (or did). >>>> This is also the approach used in applications with similar Python >>>> bindings such as VTK and ParaView. You use the embedded interpreter to >>>> manipulate the application, or start a new instance from a shell. >>> >>> Is there any working example of this? This would solve my problem. >> >> These are the files from the example on my blog: >> http://timvdm.blogspot.com/2009/05/using-avogadro-library-from-python.html >> >> standalone.py: http://pastebin.com/f31262712 >> mainwindow.ui: http://pastebin.com/f5fefc48f >> >> Tim >> >>>> The second approach would be interesting, but would need some work to >>>> set up a server. Are there many use cases not satisfied by starting a >>>> new instance of Avogadro from a shell (or more likely, the GLWidget), >>>> and if users want the full application too then use the embedded >>>> interpreter? >>> >>> I don't need this, but it would provide a way to interface with >>> Avogadro from other languages, e.g. Java. >>> >>>> Marcus >>>> >>> >>> ------------------------------------------------------------------------------ >>> Come build with us! The BlackBerry® Developer Conference in SF, CA >>> is the only developer event you need to attend this year. Jumpstart your >>> developing skills, take BlackBerry mobile applications to market and stay >>> ahead of the curve. Join us from November 9-12, 2009. Register now! >>> http://p.sf.net/sfu/devconf >>> _______________________________________________ >>> Avogadro-Discuss mailing list >>> Avo...@li... >>> https://lists.sourceforge.net/lists/listinfo/avogadro-discuss >>> >> > |