pymol-open-source
pymol-open-source copied to clipboard
new API to export geometry per selection
This is a feature request to export geometry per selection.
First requested by @jaredsampson on the pymol-users
mailing list:
https://www.mail-archive.com/[email protected]/msg15640.html
Input arguments:
- atom selection
- representation (e.g.
surface
orcartoon
)
Output: CGO or lists of vertex and normal coordinates. CGO would be more generic, but eventually harder to use (needs to be parsed). List of coordinates would be specific for the primitive type (e.g. triangles), which will not work for some representations which have more than one primitive (e.g. cartoon can have triangles and cylinders).
Thanks, Thomas. This sounds great. To produce the different output possibilities, there could be a mode
argument, with such options as:
- CGO
- triangles (like
use_shaders=0
) - primitives
- possibly other text formats, e.g. Wavefront OBJ, VRML2?
For reference, my current application and the reason for my original inquiry on pymol-users
, would be to export the surface geometry to calculate average per-residue surface normal vectors.
Also, the output for the "primitives" option could be a list
of dict
s, which would take care of handling multiple primitive types.