[PyMOL] How to read the alignment object

2021-02-23 Thread Pedro Lacerda
Hi, I aligned my structures with the align command and the object argument. So I got an alignment object. But how can I read this data structure? -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1

Re: [PyMOL] How to edit a volume field?

2020-11-09 Thread Pedro Lacerda
> abs(zmax - zmin) / (field.shape[2] - 1), > ) > > # position rounding by +0.5 > idx = ( > int((at.coord[0] - xmin) / xinc + 0.5), > int((at.coord[1] - ymin) / yinc + 0.5), > int((at.coord[2] - zmin) / zinc + 0.5), > )

Re: [PyMOL] How to get the object name from chempy.Atom

2020-11-09 Thread Pedro Lacerda
> print(state) > > # using iterate or iterate_state > def callback(x, y, z, text_type, model, state): > print((x, y, z)) > print(text_type) > print(model) > print(state) > cmd.iterate_state(0, "all", "callback(x,y,z,text_type,model,sta

[PyMOL] How to edit a volume field?

2020-11-08 Thread Pedro Lacerda
Hi, I'm using `cmd.get_volume_field(copy=0)` to edit maps. Each grid cell must increase by 1 each time the condition `atom.text_type in atomtypes` is met. But something went wrong and the map mesh didn't align with the atoms. `ensemble.selection` and `obj` spawns atoms in the exact same position

[PyMOL] How to get the object name from chempy.Atom

2020-11-06 Thread Pedro Lacerda
Hi, I got an `chempy.Atom` instance via `cmd.get_model().atom`. How to get the state and object name. Thank you! -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1856 http://lattes.cnpq.br/83385

Re: [PyMOL] Detect library mode

2020-11-02 Thread Pedro Lacerda
My plugin fail in library mode because it tries to add a Qt menu. Just an error message appears. If there is two init functions, one for GUI and other for CL, would work. __init_plugin__ __init_gui_plugin__ Em ter, 27 de out de 2020 21:00, Pedro Lacerda escreveu: > Hi, > > How to det

[PyMOL] Detect library mode

2020-10-27 Thread Pedro Lacerda
Hi, How to detect if we are in the library mode or on the GUI mode? -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1856 http://lattes.cnpq.br/8338596525330907

Re: [PyMOL] pref_get() on library mode

2020-10-26 Thread Pedro Lacerda
Let me be honest. It worked like an old car. Qt wasn't loaded so an error message appears because my plugin uses Qt. The plugin initialization failed. Despite the message everything was ok and the preferences showed up. Em seg, 26 de out de 2020 13:21, Pedro Lacerda escreveu: > It wor

Re: [PyMOL] pref_get() on library mode

2020-10-26 Thread Pedro Lacerda
gt; value = pymol.plugins.pref_get('YOUPLUGIN_SOME_KEY') > > > I feel like this plugin API is due for an overhaul, there are no great > answers to your various questions :-/ > > Cheers, > Thomas > > > > On Oct 26, 2020, at 5:40 AM, Pedro Lacerda wrote: > > &g

[PyMOL] pref_get() on library mode

2020-10-25 Thread Pedro Lacerda
Hi, How to use pref_get() on library mode. Or even better, how to use pref_get() even before library mode? -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1856 http://lattes.cnpq.br/8338596525330

Re: [PyMOL] Formatted output

2020-10-25 Thread Pedro Lacerda
I see that probably you are using HTML for this. https://github.com/schrodinger/pymol-open-source/blob/69b1f0b53b4109c34604adcea3983e4d3886069e/modules/pymol/colorprinting.py But printing HTML directly into the console didn't worked. Em dom., 25 de out. de 2020 às 23:06, Pedro Lacerda esc

[PyMOL] Formatted output

2020-10-25 Thread Pedro Lacerda
Hi, How can I print formatted output into the PyMOL console? I see that on the incentive version the output is coloured (eg errors are red). -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1856

[PyMOL] Command varargs

2020-07-30 Thread Pedro Lacerda
Hi, How can I accept variable arguments in my command? My first attempt was: @pm.extend def func(*args, kw1=1, kw2=True): pass -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular / UFBA Mestrando em Ciências Farmácias / UEFS @pslacerda +55 71 9 9981-1856 http://latte

Re: [PyMOL] User data

2020-07-16 Thread Pedro Lacerda
#x27;], 'pymol', 'myplugindata') > > > Let me know how you decide or if you have other ideas! > > Cheers, > Thomas > > > > On Jun 9, 2020, at 10:20 PM, Pedro Lacerda wrote: > > > > Hi PyMOL users and developers, > > > > I have a pl

Re: [PyMOL] How to count the number of molecules in a selection?

2020-07-10 Thread Pedro Lacerda
tmpsele, selection): > count += 1 > while cmd.select(tmpsele, f'{tmpsele} &! bm. first {tmpsele}'): > count += 1 > cmd.delete(tmpsele) > if not int(quiet): > print(f' Number of molecules: {count}') > return

[PyMOL] How to count the number of molecules in a selection?

2020-07-09 Thread Pedro Lacerda
... via programming -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular Faculdade de Farmácia / UEFS @pslacerda +55 71 9 9981-1856 http://lattes.cnpq.br/8338596525330907 ___ PyMOL-users mailing list Archives: http://www.mail-arc

Re: [PyMOL] cmd.get_fastastr()

2020-07-07 Thread Pedro Lacerda
; bs. ({tmpsele} & chain {chain})") <= 25: > pm.delete(sim_pdb) > is_apo = False > break > pm.delete(tmpsele) > > > Cheers, > Thomas > > > > On Jul 6, 2020, at 10:59 PM, Pedro Lacerda wrote: > > > > I used the functi

Re: [PyMOL] cmd.get_fastastr()

2020-07-06 Thread Pedro Lacerda
7;): > return ''.join(L.strip() for L in > cmd.get_fastastr(selection).splitlines() > if not L.startswith('>')) > > > Cheers, > Thomas > > > > On Jul 4, 2020, at 5:17 PM, Pedro Lacerda wrote: > > > > Hi, &g

Re: [PyMOL] 2 proteins plus ligand

2020-07-06 Thread Pedro Lacerda
Hi Larry, My guess is that you need a docking tool (like DOCKTHOR server; https://dockthor.lncc.br/v2/). So you pulled the protein structures from the web... the coordinates from one is arbitrary to the other. If they interact in a way that forms a protein-protein interface (PPI) then you need a

Re: [PyMOL] Radius of gyration of a trimer

2020-07-05 Thread Pedro Lacerda
Correction: gyradius is the name. Em dom., 5 de jul. de 2020 às 06:42, Pedro Lacerda escreveu: > It can be accomplished with the following command (gyration on psico > library): > > https://pymolwiki.org/index.php/Radius_of_gyration > > > Em dom., 5 de jul. de 2020 às 0

Re: [PyMOL] Radius of gyration of a trimer

2020-07-05 Thread Pedro Lacerda
It can be accomplished with the following command (gyration on psico library): https://pymolwiki.org/index.php/Radius_of_gyration Em dom., 5 de jul. de 2020 às 04:15, Dr. Subramanian, Senthil Kumar < senth...@hu-berlin.de> escreveu: > Hello, > > I would like to measure radius of gyration for a

[PyMOL] cmd.get_fastastr()

2020-07-04 Thread Pedro Lacerda
Hi, The get_fastastr function changed. Before it returned the aminoacid sequence. Now it returns a FASTA formatted string. How can I get the old behaviour (ie. get the aminoacid sequence)? -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular Faculdade de Farmácia / UFBA

Re: [PyMOL] Python script with iterate_state and selection command

2020-06-22 Thread Pedro Lacerda
Hi, Not sure if I understood your code but maybe you want change Myselection to: Myselection="resname SOL within 3.5 of resname CHO" -- Pedro Lacerda Em seg, 22 de jun de 2020 10:44, ABEL Stephane escreveu: > Hello all, > > I would like to write a basic python script to

Re: [PyMOL] ramachandran plots

2020-06-09 Thread Pedro Lacerda
Never used but this plugin does Ramachandran plot. https://pymolwiki.org/index.php/Dynoplot Em ter., 9 de jun. de 2020 às 17:26, Thomas Charles Pochapsky < pocha...@brandeis.edu> escreveu: > Is there a plug-in or command that will output a Ramachandran plot for a > loaded PDB file? > > Thanks, >

[PyMOL] User data

2020-06-09 Thread Pedro Lacerda
Hi PyMOL users and developers, I have a plugin that needs to download data periodically. Where should I download to? By the way, I managed to get a plugin into a python package. https://github.com/pslacerda/pymol-labimm/blob/master/scripts/pymol_labimm.py -- Pedro Sousa Lacerda Laboratório de

[PyMOL] How to load ~/.pymolpluginsrc.py before finish_launching()?

2020-03-16 Thread Pedro Lacerda
Hi, As the title says: How to load *~/.pymolpluginsrc.py* before *finish_launching()*? I didn't found an way to access saved preferences in library mode. -- Pedro Sousa Lacerda Laboratório de Bioinformática e Modelagem Molecular Faculdade de Farmácia / UFBA @pslacerda +55 71 9 9981-1856 http:

Re: [PyMOL] Protonated aspartic acid

2020-01-07 Thread Pedro Lacerda
Hi Neena, Check the builder. You can change the charge of a atom adding or removing H. Cheers, [image: image.png] Em ter., 7 de jan. de 2020 às 20:29, Neena Susan Eappen < neenasusan...@gmail.com> escreveu: > Hello PyMOL users, > > How to change the protonation state of aminoacid in Pymol? Say

Re: [PyMOL] User defined variable or property

2020-01-06 Thread Pedro Lacerda
Didn't found the module `pymol.properties.set_property` as stated by https://pymol.org/pymol-command-ref.html#set_property. Em seg., 6 de jan. de 2020 às 15:40, Pedro Lacerda escreveu: > Hi, > > How can I store custom object properties. > > I didn't found `set_property

[PyMOL] User defined variable or property

2020-01-06 Thread Pedro Lacerda
Hi, How can I store custom object properties. I didn't found `set_property` or `get_property` in my PyMOL version. Neither found a way to store arbitrary session data. I even tried to encode data in the label to parse it back, but found no way to read a label value. How can I have the `set_prope

Re: [PyMOL] Autosave

2019-11-22 Thread Pedro Lacerda
I would rather create a QTimer to autosave and autorender. It would report correct CPU usage. After then you may of course create a plugin: https://pymolwiki.org/index.php/Plugins_Tutorial. Em sex, 22 de nov de 2019 22:41, Pedro Lacerda escreveu: > Only now I see your code. I'm not ver

Re: [PyMOL] Autosave

2019-11-22 Thread Pedro Lacerda
Only now I see your code. I'm not very versed with PyMOL code but maybe you want to wait for the pymol lock. Grep for the lock and wait for it. Can you imagine the last auto rendering be a wrong image after a long and hard session. Em sex, 22 de nov de 2019 22:36, Pedro Lacerda escreveu:

Re: [PyMOL] Autosave

2019-11-22 Thread Pedro Lacerda
Hi Jason, You can save with Ctrl-S, as you might know. Auto rendering would be complicated because there is a lot of options. For instance, you may have to choose low DPI for quick inspection or high for final rendering. Best regards, Pedro Lacerda Em sex, 22 de nov de 2019 19:49, Junsu Park

Re: [PyMOL] Get surface coordinates

2019-11-11 Thread Pedro Lacerda
ctMap, FB_Actions) " ObjectMapDump: %s written to %s\n", om->Name, fname ENDFB(om->G); } } Em qui., 7 de nov. de 2019 às 11:41, Jared Sampson < jared.samp...@columbia.edu> escreveu: > Hi Pedro - Glad you have something working for your use case. > > Best, > Jared

Re: [PyMOL] View manger (and how to store arbitrary data on the session?)

2019-11-09 Thread Pedro Lacerda
t. de 2019 às 20:13, Pedro Lacerda escreveu: > Hi Jared, > > Glad you liked and thank you for the patch and incentive. I'll pull it on > the repo and create a wiki page. > > Best regards, > Pedro Lacerda > > > Em qua, 30 de out de 2019 14:16, Jared Sampson > es

[PyMOL] Show lone pairs

2019-11-09 Thread Pedro Lacerda
Hi, According to this page seems that GOLD software craft pseudoatoms to represent lone pairs. https://chemistryandcomputers.wordpress.com/2012/05/31/pymol-tip/ I would expect some `lone_pairs` setting (like `valence` and `RepValence`) would represent it. Is there any way to show lone eletron p

Re: [PyMOL] Get surface coordinates

2019-11-05 Thread Pedro Lacerda
me) Em ter., 5 de nov. de 2019 às 11:13, Pedro Lacerda escreveu: > For the sake of completeness here is some working code. > > `dump` exports the surface of map representations. They are all surfaces. > > So I had to dump the map at each level (0.5 by 0.5 increment) in order to >

Re: [PyMOL] Get surface coordinates

2019-11-05 Thread Pedro Lacerda
levels[level] = xyz return levels finally: os.unlink(dump_fname) Em seg., 4 de nov. de 2019 às 01:38, Pedro Lacerda escreveu: > Hi Jared, > > So COLLADA exports some kind of already rendered 3D image. > > Took me some time to figure out if dump export

Re: [PyMOL] Get surface coordinates

2019-11-03 Thread Pedro Lacerda
Hi Jared, So COLLADA exports some kind of already rendered 3D image. Took me some time to figure out if dump exports the map points or something specific to the surface representation. In fact, it is yet to be figured out. Dump can export at least map and surface objects. When I export two diff

Re: [PyMOL] About Pymol 2.3 Python Package

2019-11-02 Thread Pedro Lacerda
Hi, Certainly you can use PyMOL as you want, it is open source (has few restrictions). If you install from Ubuntu or Fedora repositories you can use freely. Don't worry, just share your code or session then your coworkers open as they can. If is for your sole analysis don't worry as well. (In fa

Re: [PyMOL] Get surface coordinates

2019-10-31 Thread Pedro Lacerda
Just one more question, what are these normal values? Em sex, 1 de nov de 2019 às 02:43, Pedro Lacerda escreveu: > Hi Thomas, > > The cmd.get_volume_field() returns a sparse ndarray with unknow layout and > all dimensions variables depending of the object. How to interpret such &

Re: [PyMOL] Get surface coordinates

2019-10-31 Thread Pedro Lacerda
3 for the normal. > > For cmd.get_volume_field you need the map name, not the surface name. > > data = cmd.get_volume_field('acceptor') > print(data) > > > Hope that helps. > > Cheers, > Thomas > > > > On Oct 30, 2019, at 6:42 AM, Pedro

Re: [PyMOL] View manger (and how to store arbitrary data on the session?)

2019-10-30 Thread Pedro Lacerda
Hi Jared, Glad you liked and thank you for the patch and incentive. I'll pull it on the repo and create a wiki page. Best regards, Pedro Lacerda Em qua, 30 de out de 2019 14:16, Jared Sampson escreveu: > Hi Pedro - > > I just took a look at the plugin, and it seems quite

Re: [PyMOL] Get surface coordinates

2019-10-29 Thread Pedro Lacerda
And cmd.get_volume_field is returning -1. Em qua, 30 de out de 2019 às 02:00, Pedro Lacerda escreveu: > Hi, > > How can I access the underlying coordinates of acceptor, donor and apolar > surface objects on the given session given by the following server? Coords > akin to dot

[PyMOL] Get surface coordinates

2019-10-29 Thread Pedro Lacerda
Hi, How can I access the underlying coordinates of acceptor, donor and apolar surface objects on the given session given by the following server? Coords akin to dot representation would suffice. http://fragment-hotspot-maps.ccdc.cam.ac.uk/results_table http://fragment-hotspot-maps.ccdc.cam.ac.uk/

Re: [PyMOL] educational PyMOL 1.7.4.5 crashing with Mac Catalina OS 10.15

2019-10-18 Thread Pedro Lacerda
Recently I found that the trial version 2.x don't expires. You may have some trouble with licensing, but it is fine for 30 days. I had only some trouble with pse versions, but the pse_export_version option did the job. https://pymol.org/2/ Em sex, 18 de out de 2019 às 17:50, Amy C Rosenzweig es

[PyMOL] Custom plugin requirements

2019-08-16 Thread Pedro Lacerda
it is very clever. The commercial version of PyMOL is already shipped with its own version of Python (and conda I guess). But would not be that messy for user local pip packages, after all is for this kind of reason to encourage user local packages instead of system wide. What do you think? Bes

Re: [PyMOL] How to download and install

2019-08-15 Thread Pedro Lacerda
9:46, Joel Tyndall escreveu: > Details of where to get the appropriate files are available here. > > > > https://pymolwiki.org/index.php/Windows_Install > > > > With a little bit of tinkering I was able to install this > > > > J > > > > *From:

Re: [PyMOL] Label volume

2019-08-15 Thread Pedro Lacerda
l) in 3-Button Editing mouse mode while > holding CTRL and dragging with the left mouse button. > > Cheers, > Thomas > > > On Aug 12, 2019, at 7:01 PM, Pedro Lacerda wrote: > > > > And how to place a single arbitrary label on the object or segment? > > >

Re: [PyMOL] count_atoms and states

2019-08-15 Thread Pedro Lacerda
Hi, Thank you for your effort. This would be the very best option? Thinking the use case that users need all the states would be a lot harder. I would rather let state 0 refer to all the states like now, but upper nonexistent states give an error. This would remove some errors by 1, and would wo

[PyMOL] How to download and install

2019-08-14 Thread Pedro Lacerda
Hi, I'm unable to build or download and install PyMOL for Windows for free in our laboratory. How can I find a valid license or a free build? Don't need all the features of the professional version, but would be very useful. ___ PyMOL-users mailing list

Re: [PyMOL] Label volume

2019-08-12 Thread Pedro Lacerda
And how to place a single arbitrary label on the object or segment? Em seg, 12 de ago de 2019 às 13:55, Pedro Lacerda escreveu: > Hi PyMOL list, > > Is possible toshow a label independent of the associated object be > enabled? > > Or is possible to label a volume or map?

[PyMOL] Label volume

2019-08-12 Thread Pedro Lacerda
Hi PyMOL list, Is possible toshow a label independent of the associated object be enabled? Or is possible to label a volume or map? -- Pedro Sousa Lacerda *Laboratório de Bioinformática e Modelagem Molecular* *Faculdade de Farmácia / UFBA* *@pslacerda* *+55 71 9 9981-1856* _

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
until I needed get_area, it properly stated that my states were nonexistant. So these were my personal thoughts and issues about. Have a nice weekend! Em sex, 9 de ago de 2019 12:41, Pedro Lacerda escreveu: > Question answered. > > Best regards! > > Em sex, 9 de ago de 2019 às 1

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
ly counting atoms which match > "polymer" *or* "state X", which is why the number only goes up to 8627 > when you count state 1. > > This might clear up your scope question as well, but please indicate if > otherwise. > > Best, > Cole > > On Fri, Aug 9

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
f resn NAP* > count_atoms: 8109 atoms > > *PyMOL>count_atoms (polymer (state 1)) within 0 of resn NAP* > count_atoms: 192 atoms > > *PyMOL>count_atoms (polymer (state 0)) within 0 of resn NAP* > count_atoms: 0 atoms > Em sex, 9 de ago de 2019 às 11:31, Pedro Lace

[PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
Hi, There is only one state but the atom counting changes between states 0, 1 and 2. What this means? *PyMOL>fetch 1e92* > > TITLE Pteridine reductase 1 from Leishmania major complexed with NADP+ > and dihydrobiopterin > ExecutiveLoad-Detail: Detected mmCIF > CmdLoad: loaded as "1e92". >

Re: [PyMOL] Selection algebra

2019-08-05 Thread Pedro Lacerda
extent(s)[0][0] >= 50 > > Best, > Cole > > On Mon, Aug 5, 2019 at 1:06 PM Pedro Lacerda wrote: > >> Yes, one more question. >> >> How to use all other "functions", like byres, "chain A" or "organic"? >> >> Em seg, 5

Re: [PyMOL] Selection algebra

2019-08-05 Thread Pedro Lacerda
lease let me know if you have any further questions. > > Best, > Cole > > On Mon, Aug 5, 2019 at 8:30 AM Pedro Lacerda wrote: > >> I expressed myself wrong, I'm looking something like: >> >>select peplength < 15 and chain A >> >> Where pep

Re: [PyMOL] Selection algebra

2019-08-05 Thread Pedro Lacerda
Fri, Aug 2, 2019 at 2:41 PM Christian "Cole" French < > christian.fre...@schrodinger.com> wrote: > >> Hi Pedro Lacerda, >> >> Here is a link to a script I wrote which adds a command which does what >> you ask: >> https://gist.github.com/ColeFrench/6f68

[PyMOL] Selection algebra

2019-08-02 Thread Pedro Lacerda
Hi PyMOL users, It there any way to enhance the selecion algebra with functions? For instance: select len(get_chains(*)) < 2 > Or even: select cmd.get_fastastr(*) < 2 > By the way, why some commands we can simply run (like get_chains) and others are different (like cmd.get_fastastr())? -- P

[PyMOL] pymol2 and multiprocessing issues

2019-08-01 Thread Pedro Lacerda
Hi, I'm using pymol2.PyMOL() to instantiate a PyMOL session per process but it is struggling at threading locks wasting all the time locked (ie doing nothing). My job function only the following commands from PyMOL: fetch, align, get_model and delete. It clean all the objects within the function

[PyMOL] Display running commands

2019-02-21 Thread Pedro Lacerda
eate(*args, **kwargs) cmd.create = create I also want it to figure out what commands some GUI actions really do. Like those in presets and so on. There is some verbose option that does it? Thank you, Pedro Lacerda ___ PyMOL-users mailing list Arch