schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.15k stars 275 forks source link

How to use geomery parameter with 'attach' command? #208

Open Glucksistemi opened 2 years ago

Glucksistemi commented 2 years ago

I just can't understand at all what is possible values and where I can get any reference about using this value. So I cannot understand how to use it correctly. Please share any clues I can use to understand the mechanism

JarrettSJohnson commented 2 years ago

Thanks for submitting this issue. This is something that needs work on the Wiki as well.

The geometry parameter here refers to the steric number of that atom (number of other atoms bound to it) to determine the atoms geometry.

Here's an example of a list of elements and their geom value found in alanine:

'N + 4'
'C + 4'
'C + 3'
'O + 3'
'C + 4'
'O + 4'
'H + 1'
'H + 1'
'H + 1'
'H + 1'
'H + 1'
'H + 1'
'H + 1'
ziyuanzhao2000 commented 1 year ago

Hi, I have a related question so I'm not opening another issue to ask. Hope that's okay! I'm curious how pymol builder determines the coordinates of any newly added atoms. I tried to study the source code and traced it down to cmd.replace and editor.attach_fragment. I feel like it might has to do with geometry argument for the replace or attach command but I'm not sure. I see this question is still open, so I just want to follow up and ask about this. Thanks!