| 1 | # Add Chimera pipes and planks command "pp".
|
|---|
| 2 |
|
|---|
| 3 | from Midas import midas_text
|
|---|
| 4 | def pp_cmd(cmd_name, args):
|
|---|
| 5 | midas_text.doExtensionFunc(pp, args, specInfo = [('modelSpec', 'mols', 'molecules')])
|
|---|
| 6 |
|
|---|
| 7 | midas_text.addCommand('pp', pp_cmd)
|
|---|
| 8 |
|
|---|
| 9 | def pp(mols,
|
|---|
| 10 | helixColor = None,
|
|---|
| 11 | helixEdgeColor = None,
|
|---|
| 12 | helixArrow = True,
|
|---|
| 13 | helixFixedRadius = True,
|
|---|
| 14 | helixRadius = 1.25,
|
|---|
| 15 | helixSplit = False,
|
|---|
| 16 | helixSplitRatio = 2.5,
|
|---|
| 17 | strandColor = None,
|
|---|
| 18 | strandEdgeColor = None,
|
|---|
| 19 | strandArrow = True,
|
|---|
| 20 | strandFixedWidth = True,
|
|---|
| 21 | strandWidth = 2.5,
|
|---|
| 22 | strandFixedThickness = True,
|
|---|
| 23 | strandThickness = 1.0,
|
|---|
| 24 | strandSplit = False,
|
|---|
| 25 | strandSplitRatio = 2.5,
|
|---|
| 26 | displayCoils = True,
|
|---|
| 27 | displayTurns = True,
|
|---|
| 28 | turnColor = None,
|
|---|
| 29 | turnEdgeColor = None,
|
|---|
| 30 | turnResolution = 10,
|
|---|
| 31 | turnWidth = 0.25,
|
|---|
| 32 | turnThickness = 0.25):
|
|---|
| 33 |
|
|---|
| 34 | from PipesAndPlanks.base import makePandP
|
|---|
| 35 | for mol in mols:
|
|---|
| 36 | makePandP(mol,
|
|---|
| 37 | helixColor,
|
|---|
| 38 | helixEdgeColor,
|
|---|
| 39 | helixArrow,
|
|---|
| 40 | helixFixedRadius,
|
|---|
| 41 | helixRadius,
|
|---|
| 42 | helixSplit,
|
|---|
| 43 | helixSplitRatio,
|
|---|
| 44 | strandColor,
|
|---|
| 45 | strandEdgeColor,
|
|---|
| 46 | strandArrow,
|
|---|
| 47 | strandFixedWidth,
|
|---|
| 48 | strandWidth,
|
|---|
| 49 | strandFixedThickness,
|
|---|
| 50 | strandThickness,
|
|---|
| 51 | strandSplit,
|
|---|
| 52 | strandSplitRatio,
|
|---|
| 53 | displayTurns,
|
|---|
| 54 | turnColor,
|
|---|
| 55 | turnEdgeColor,
|
|---|
| 56 | turnResolution,
|
|---|
| 57 | turnWidth,
|
|---|
| 58 | turnThickness)
|
|---|