Hot answers tagged

4

To expand on the comment by marcin: fetch downloads files in mmCIF format by default (https://pymolwiki.org/index.php/Fetch). Not all PDB entries have PDB format files, e.g. due to too many chains. Presumably this is why the change was made, though mmCIF files tend to be larger and hence download slower. When calling save with the .pdb file extension the ...


3

Note: as I don't have any working version of pymol at the moment, I am not able to test the solution properly. However, an easy way is to first create a selection, and then to color it: select toBecolored, resi 3-8 color yellow, toBecolored Regarding the L/H chain part, if they are effectively annotated as L and H, something like the following should work: ...


3

So on the GUI form of PyMOL on the right hand side you have a list of what is ambiguously called objects in PyMOL (models elsewhere), which can be enabled or disabled by clicking on their name. The name also has a 1/1 in green or similar. This indicates the state. In your case you have 2 states. To split a multistate object use split_state prot_A To ...


2

Ok, after some more searching I found the answer. You have to use the cmd.iterate function to iterate over the default selection ("sele", first parameter). With the second parameter you can push the variables you need into an array for later access. In this case I wanted the residue number so I used the variable 'resv'. A full list of the variables exposed ...


2

'label_size' is a object-state-level setting, which means that you will have to rely on the 'create' command to create a new object for every different label size. It can certainly be automated, and for this I'd recommend getting into Pyhton Scripting for PyMOL


2

I believe PDB2PQR CLI will do the work wonderfully. Don't let the name trick you: PQR files are organized like PDB ones. Under the hood it runs propka, which is state-of-the-art for predicting a protein residues protonation state. The best part is that you can use PDB2PQR web server and they will give you the corresponding CLI arguments for each option you ...


2

So you can install PyMOL as a standalone, but you can also install it as a bona fide Python 3 module via conda: conda install -c schrodinger -c conda-forge pymol-bundle It can be installed in other ways —apt-get or brew or even compiled, but the latter is excruciatingly painful. In your python notebook you can do: import pymol2 with pymol2.PyMOL() as pymol: ...


1

maybe you can use the "per-residue interaction scores" (wich is available via Schrödinger). On the other hand,to show if a Docking Pose is really "better" you could show specific interactions rather than the complete big molecule.. e.g. an important salt bridge is missing. (hydrogen bonds are not that important, due to the fact that they ...


1

It is a glitch in PyMOL. Caveat. I would say that, whereas cmd.label is great for adding labels en-mass for internal figures, it is not great for figures for dissemination (which require few strategically placed labels possibly with a faint white outer glow —cf. your D330): most figures in papers I would say are Powerpoint or Photoshop labelled. You called ...


1

Welcome. The Protein-Ligand-complex is the complete protein with Ligand! If you only want to compare the two ligands, you can delete the rest of the proteins, or specify the input so only the ligand is choosen. (select Ligand and save selection. then use the function on that selections) But be aware that for Docking comparison you probably don't want to ...


1

from https://www.blopig.com/blog/2019/08/how-to-iterate-in-pymol/ Example 1: Print the names of all the selected objects You’ve selected several objects in PyMOL, and you want to see their names. By default, a new selection object called “(sele)” is created. We can create a Python variable called seleobjs, say, and then loop over them: seleobjs = cmd....


1

Spheres So how PyMOL stores how it shows atoms is that each atom has a colour and a represention, which is a binary number telling what to show. Therefore the colour for spheres is the same as the colour for sticks. The only way round this is to copy the object (create copycat, original and you set copycat differently) To set the atom you do select ...


1

I know that structure way too well —SARS-COV-2 MPro. In PyMOL command line remove resn 02J or 010 or cmd.remove('resn 02J or 010') In python import pymol2 with pymol2.PyMOL() as pymol: pymol.cmd.fetch('6LU7') pymol.cmd.remove('resn 02J or 010') pymol.cmd.save('6LU7.mod.pdb') #or pdbblock = pymol.cmd.get_pdbstr() From the ...


1

You made the hardest work, you were not far to achieve what you wanted ;) This script.py should work after you made it executable (in a terminal type: chmod u+x script.py), just type ./script.py in your terminal in your working directory (so here you should be in your "sp" directory). Note that I got inspired by: https://www.biostars.org/p/42474/ ...


1

Let's simplify... cmd.distance(xx,xxx) accepts two selector strings and is fine with and state 1. And best of all if you select multiple atoms it gives you the smallest distance! So all you need to do is: # measure d_O = cmd.distance('UNL and element O', 'resi 312 and name ND2') d_N = cmd.distance('UNL and element N', 'resi 113 and name OD2') # write f=...


1

Open the PyMOL session. Use the load command to load your PDB file(s): load file.pdb. Use the align or super commands to overlay structures, e.g. align prot1, prot2.


1

Thanks a lot to all who commented/replied, the author of the scripts provided a response. It was down to a syntax change in PyMol of which I wasn't aware that caused my selection to come up empty.


1

You can use pymolrc and create aliases to your scripts. If your script is located e.g. in /Users/tillyboy/pymolscripts/myscript1.pml Just enter this line to your pymolrc: alias myscript1, run /Users/tillyboy/pymolscripts/script1.pml Now myscript1 is available for all your Pymol sessions independent of your current working directory.


1

So it is really hard to make a given python instance run a library from a different instance. It is not just one dist-packages library folder, but multiple that you would need to link, and all that assuming they use the same version of python. So the best bet is to install a new instance of pymol the python module. The module can be installed in a python ...


1

Firstly, I would preface that the PyMOL command line in the GUI is great, but you can run PyMOL as a regular Python library (calling the appropriate python). This makes life so much simpler for more complex manipulations. You can do really complex manipulations with it. I cannot suggest it enough. The API version of the commands works only marginally ...


1

I ended up fixing this by just putting this into the boilerplate code: copy PolyA-MC_4, PolyA-MC copy PolyA-MC_6, PolyA-MC copy PolyA-MC_8, PolyA-MC copy PolyA-MC_10, PolyA-MC copy PolyA-MC_12, PolyA-MC copy PolyA-MC_14, PolyA-MC copy PolyA-MC_16, PolyA-MC copy PolyA-MC_18, PolyA-MC copy PolyA-MC_20, PolyA-MC This copied my object such that I had one per ...


1

So this was the code I used and it worked (as far as I could see) and refers to point 2 of @jgreener's advice and was based on the comment by @marcin python pdb_lists = ['3LZG', '6HJN'] # lots more pdbs for x in pdb_lists: cmd.fetch(x, type='pdb') cmd.select(x) cmd.save(x + '.pdb', x) cmd.delete(x) cmd.quit() python end There are some Bio SE ...


1

Your shell script is fine, and works as expected. The reason it hangs is that you aren't telling PyMol to exit after running your script, so it's still running and waiting for the next command. Just add a quit at the end and it should work: #!/bin/bash pwd echo 'fetch 1OYT remove resn HOH h_add elem O or elem N select ligand, resn FSN select prot, 1OYT ...


Only top voted, non community-wiki answers of a minimum length are eligible