-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add color to Jupyter notebook module
- Loading branch information
Showing
6 changed files
with
87 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
""" | ||
Contains the coloring operations | ||
""" | ||
|
||
from command import Command | ||
|
||
|
||
def _color_command(name, *args, **kwargs): | ||
return Command('pv.color', name, args, kwargs) | ||
|
||
|
||
def _gradient(name): | ||
return Command('pv.color', 'gradient', [name], {}) | ||
|
||
|
||
def uniform(color='red'): | ||
return _color_command('uniform', color) | ||
|
||
|
||
def by_element(): | ||
return _color_command('byElement') | ||
|
||
|
||
def by_ss(): | ||
return _color_command('bySS') | ||
|
||
|
||
def by_chain(gradient='rainbow'): | ||
return _color_command('byChain', _gradient(gradient)) | ||
|
||
|
||
def ss_succession(gradient='rainbow', coil_color='lightgrey'): | ||
return _color_command('ssSuccession', _gradient(gradient), coil_color) | ||
|
||
|
||
def by_atom_prop(prop, gradient='rainbow', min_max=None): | ||
return _color_command('byAtomProp', prop, _gradient(gradient), min_max) | ||
|
||
|
||
def by_residue_prop(prop, gradient='rainbow', min_max=None): | ||
return _color_command('byResidueProp', prop, _gradient(gradient), min_max) | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters