molstar / molrender

Create macromolecular images
MIT License
29 stars 9 forks source link

orientation change of multiple chain structures based on first chain + chain-list rendering + operator options #8

Closed MarkMa2003 closed 1 year ago

MarkMa2003 commented 1 year ago
  1. First Chain Based Re-Orientation: If there is more than one chain in the structure, the new version will use the average of position of the first chain coordinates to decide the orientation of the picture based on the rule that the average should be in the first quadrant.
  2. Chain List Rendering: the new features will render chain list in the following format molrender chain-list /path/to/5cbg.cif /path/to/out/ asmIndex chain chainName1 [operator1] chain chainName2 [operator2] ...
  3. Operator Options: the operator can have two formats for renderings operator-name ASM_17 and operator-list 1 23 where is a operator list separated by space. This should be in the position of [operator1], [operator2] in the above command line.
  4. Refactor the code to improve readability.

For example: molrender chain-list 1m4x.cif outpath 0 chain A operator-list 61 1 chain A operator-name ASM_2 chain A operator-name ASM_17 chain B operator-list 78 14 will generate: 1m4x_chain-list-assembly-1-A-61-1-A-ASM_2-A-ASM_17-B-78-14 molrender chain-list 1m4x.cif outpath 0 chain A operator-list 61 1 chain A operator-name ASM_2 chain A operator-name ASM_17 chain B operator-name ASM_42 will generate: 1m4x_chain-list-assembly-1-A-61-1-A-ASM_2-A-ASM_17-B-ASM_42 molrender chain-list 1m4x.cif outpath 0 chain A operator-list 61 1 chain A operator-name ASM_2 chain A operator-name ASM_17 chain B will generate: 1m4x_chain-list-assembly-1-A-61-1-A-ASM_2-A-ASM_17-B