Welcome to worms’s documentation!

Contents:

worms

https://img.shields.io/pypi/v/worms.svg https://img.shields.io/travis/willsheffler/worms.svg Documentation Status Updates

Protein assembly design without protein interface design.

_images/worms_triangle_600.png docs/img/worms_triangle_600.png

Features

please send angry emails to willsheffler@gmail.com until there are docs here.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Installation

Stable release

To install worms, run this command in your terminal:

$ pip install worms

This is the preferred method to install worms, as it will always install the most recent stable release.

If you don’t have pip installed, this Python installation guide can guide you through the process.

From sources

The sources for worms can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/willsheffler/worms

Or download the tarball:

$ curl  -OL https://github.com/willsheffler/worms/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

Usage

To use worms in a project:

import worms

worms

worms package

Subpackages

worms.criteria package
Submodules
worms.criteria.base module

TODO: Summary

worms.criteria.base.Ux

TYPE – Description

worms.criteria.base.Uy

TYPE – Description

worms.criteria.base.Uz

TYPE – Description

class worms.criteria.base.CriteriaList(children)[source]

Bases: worms.criteria.base.WormCriteria

TODO: Summary

children

TYPE – Description

score(**kw)[source]

TODO: Summary

Parameters:kw – passthru args
Returns:Description
Return type:TYPE
class worms.criteria.base.NullCriteria(from_seg=0, to_seg=-1, origin_seg=None)[source]

Bases: worms.criteria.base.WormCriteria

TODO: Summary

from_seg

TYPE – Description

to_seg

TYPE – Description

alignment(segpos, **kw)[source]

TODO: Summary

Parameters:
  • segpos (TYPE) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

jit_lossfunc()[source]
score(segpos, **kw)[source]

TODO: Summary

Parameters:
  • segpos (TYPE) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

class worms.criteria.base.WormCriteria[source]

Bases: abc.ABC

TODO: Summary

allowed_attributes

TYPE – Description

allowed_attributes = ('last_body_same_as', 'symname', 'is_cyclic', 'alignment', 'from_seg', 'to_seg', 'origin_seg', 'symfile_modifiers', 'crystinfo')
score(**kw)[source]

TODO: Summary

Parameters:kw – passthru args
worms.criteria.bounded module
class worms.criteria.bounded.AxesIntersect(symname, tgtaxis1, tgtaxis2, from_seg, *, tol=1.0, lever=50, to_seg=-1, distinct_axes=False)[source]

Bases: worms.criteria.base.WormCriteria

TODO: Summary

angle

TYPE – Description

distinct_axes

TYPE – Description

from_seg

TYPE – Description

lever

TYPE – Description

rot_tol

TYPE – Description

sym_axes

TYPE – Description

symname

TYPE – Description

tgtaxis1

TYPE – Description

tgtaxis2

TYPE – Description

to_seg

TYPE – Description

tol

TYPE – Description

alignment(segpos, debug=0, **kw)[source]

TODO: Summary

Parameters:
  • segpos (TYPE) – Description
  • debug (int, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

Raises:

AssertionError – Description

score(segpos, verbosity=False, **kw)[source]

TODO: Summary

Parameters:
  • segpos (TYPE) – Description
  • verbosity (bool, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.criteria.bounded.D2(c2=0, c2b=-1, **kw)[source]

TODO: Summary

Parameters:
  • c2 (int, optional) – Description
  • c2b (TYPE, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.criteria.bounded.D3(c3=0, c2=-1, **kw)[source]

TODO: Summary

Parameters:
  • c3 (int, optional) – Description
  • c2 (TYPE, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.criteria.bounded.D4(c4=0, c2=-1, **kw)[source]

TODO: Summary

Parameters:
  • c4 (int, optional) – Description
  • c2 (TYPE, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.criteria.bounded.D5(c5=0, c2=-1, **kw)[source]

TODO: Summary

Parameters:
  • c5 (int, optional) – Description
  • c2 (TYPE, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.criteria.bounded.D6(c6=0, c2=-1, **kw)[source]

TODO: Summary

Parameters:
  • c6 (int, optional) – Description
  • c2 (TYPE, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.criteria.bounded.Icosahedral(c5=None, c3=None, c2=None, **kw)[source]

TODO: Summary

Parameters:
  • c5 (None, optional) – Description
  • c3 (None, optional) – Description
  • c2 (None, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.criteria.bounded.Octahedral(c4=None, c3=None, c2=None, **kw)[source]

TODO: Summary

Parameters:
  • c4 (None, optional) – Description
  • c3 (None, optional) – Description
  • c2 (None, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.criteria.bounded.Tetrahedral(c3=None, c2=None, c3b=None, **kw)[source]

TODO: Summary

Parameters:
  • c3 (None, optional) – Description
  • c2 (None, optional) – Description
  • c3b (None, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.criteria.cyclic module
class worms.criteria.cyclic.Cyclic(symmetry=1, from_seg=0, *, tol=1.0, origin_seg=None, lever=50.0, to_seg=-1, min_radius=0)[source]

Bases: worms.criteria.base.WormCriteria

alignment(segpos, **kw)[source]
jit_lossfunc()[source]
score(segpos, *, verbosity=False, **kw)[source]

TODO: Summary

Parameters:kw – passthru args
worms.criteria.unbounded module
class worms.criteria.unbounded.AxesAngle(symname, tgtaxis1, tgtaxis2, from_seg, *, tol=1.0, lever=50, to_seg=-1, space_group_str=None)[source]

Bases: worms.criteria.base.WormCriteria

alignment(segpos, out_cell_spacing=False, **kw)[source]

Alignment to move stuff to be in line with symdef file

Parameters:
  • segpos (lst) – List of segment positions / coordinates.
  • I'll accept any "non-positional" argument as name = value, and store in a dictionary (**kw) –
crystinfo(segpos)[source]
score(segpos, **kw)[source]

Score

Parameters:
  • segpos (lst) – List of segment positions / coordinates.
  • I'll accept any "non-positional" argument as name = value, and store in a dictionary (**kw) –
symfile_modifiers(segpos)[source]
worms.criteria.unbounded.Crystal_F432_C3_C4(c3a=None, c4b=None, **kw)[source]
worms.criteria.unbounded.Crystal_I213_C2_C3(c2a=None, c3b=None, **kw)[source]
worms.criteria.unbounded.Crystal_I432_C2_C4(c2a=None, c4b=None, **kw)[source]
worms.criteria.unbounded.Crystal_P213_C3_C3(c3a=None, c3b=None, **kw)[source]
worms.criteria.unbounded.Crystal_P4132_C2_C3(c2a=None, c3b=None, **kw)[source]
worms.criteria.unbounded.Crystal_P432_C4_C4(c4a=None, c4b=None, **kw)[source]
worms.criteria.unbounded.Sheet_P321(c3=None, c2=None, **kw)[source]
worms.criteria.unbounded.Sheet_P4212(c4=None, c2=None, **kw)[source]
worms.criteria.unbounded.Sheet_P6(c6=None, c2=None, **kw)[source]
Module contents
worms.data package
Module contents
class worms.data.PoseLib[source]

Bases: object

get[source]
worms.khash package
Submodules
worms.khash.khash_cffi module
Module contents

Submodules

worms.bblock module

worms.bblock.BBlock(entry, pdbfile, filehash, pose, ss)[source]
worms.bblock.bblock_components(bblock)[source]

TODO: Summary

Parameters:bblock (TYPE) – Description
Returns:Description
Return type:TYPE
worms.bblock.bblock_dump_pdb(out, bblock, dirn, splice, join=True, pos=array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]]), chain=0, anum=1, rnum=1)[source]
worms.bblock.bblock_str(bblock)[source]

TODO: Summary

Parameters:bblock (TYPE) – Description
Returns:Description
Return type:TYPE
worms.bblock.chain_of_ires[source]

Summary

Parameters:
  • bb (TYPE) – Description
  • ires (TYPE) – Description
Returns:

Description

Return type:

TYPE

worms.database module

TODO: Summary

class worms.database.BBlockDB(cachedir=None, bakerdb_files=[], load_poses=False, nprocs=1, lazy=True, read_new_pdbs=False, verbosity=0)[source]

Bases: object

stores Poses and BBlocks in a disk cache

bblock(pdbkey)[source]
bblockfile(pdbkey)[source]
build_pdb_data(entry)[source]

return Nnew, Nmissing

check_lock_cachedir()[source]
islocked_cachedir()[source]
load_cached_bblock_into_memory(pdbkey)[source]
load_cached_pose_into_memory(pdbfile)[source]
load_from_pdbs()[source]
load_from_pdbs_inner(exe)[source]
lock_cachedir()[source]
pose(pdbfile)[source]

load pose from _bblock_cache, read from file if not in memory

posefile(pdbfile)[source]
query(query, *, useclass=True, max_bblocks=150, shuffle=True)[source]

match name, _type, _class if one match, use it if _type and _class match, check useclass option Het:NNCx/y require exact number or require extra

Parameters:
  • query (TYPE) – Description
  • useclass (bool, optional) – Description
Returns:

Description

Return type:

TYPE

query_names(query, *, useclass=True)[source]

query for names only

unlock_cachedir()[source]
class worms.database.SpliceDB(cachedir=None)[source]

Bases: object

Stores valid NC splices for bblock pairs

add(params, pdbkey0, pdbkey1, val)[source]
cachepath(params, pdbkey)[source]
partial(params, pdbkey)[source]
sync_to_disk()[source]
worms.database.flatten_path(pdbfile)[source]

worms.edge module

worms.edge.Edge(u, ublks, v, vblks, verbosity=0, **kw)[source]
worms.edge.get_allowed_splices(u, ublks, v, vblks, splicedb=None, max_splice_rms=0.7, ncontact_cut=10, clashd2=9.0, contactd2=100.0, rms_range=5, clash_contact_range=9, skip_on_fail=True, parallel=False, verbosity=1, sync_to_disk_every=0.001)[source]
worms.edge.splice_metrics_pair(blk0, blk1, max_splice_rms=0.7, clashd2=9.0, contactd2=100.0, rms_range=9, clash_contact_range=9, skip_on_fail=True)[source]

worms.jitsearch module

worms.pose_contortions module

TODO: Summary

class worms.pose_contortions.AnnoPose(pose, iseg, srcpose, src_lb, src_ub, cyclic_entry)[source]

Bases: object

TODO: Summary

cyclic_entry

TYPE – Description

iseg

TYPE – Description

pose

TYPE – Description

src_lb

TYPE – Description

src_ub

TYPE – Description

srcpose

TYPE – Description

seq()[source]

TODO: Summary

Returns:Description
Return type:TYPE
srcseq()[source]

TODO: Summary

Returns:Description
Return type:TYPE
class worms.pose_contortions.CyclicTrim(sym_seg_from, sym_seg_to)

Bases: tuple

sym_seg_from

Alias for field number 0

sym_seg_to

Alias for field number 1

worms.pose_contortions.contort_pose_chains(pose, chains, nseg, ir_en, ir_ex, pl_en, pl_ex, chain_start, chain_end, position=None, pad=(0, 0), iseg=None, cyclictrim=None, last_seg_entrypol=None, first_seg_exitpol=None, sym_ir=None, sym_pol=None)[source]

make pose chains from ‘segment’ info

what a monster this has become. returns (segchains, rest) segchains elems are [enterexitchain] or, [enterchain, …, exitchain] rest holds other chains IFF enter and exit in same chain each element is a pair [pose, source] where source is (origin_pose, start_res, stop_res) cyclictrim specifies segments which are spliced across the symmetric interface. segments only needed if cyclictrim==True if cyclictrim, last segment will only be a single entry residue

Args: No

worms.pose_contortions.make_contorted_pose(*, entryexits, entrypol, exitpol, indices, from_seg, to_seg, origin_seg, seg_pos, position, is_cyclic, align, cryst_info, end, iend, only_connected, join, cyclic_permute, cyclictrim, provenance, make_chain_list)[source]

there be dragons here

worms.pose_contortions.reorder_spliced_as_N_to_C(body_chains, polarities)[source]

remap chains of each body such that concatenated chains are N->C

Parameters:
  • body_chains (TYPE) – Description
  • polarities (TYPE) – Description
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.search module

worms.search.random() → x in the interval [0, 1).

worms.segments module

TODO: Summary

class worms.segments.Segment(spliceables, entry=None, exit=None, expert=False)[source]

Bases: object

TODO: Summary

bodyid

TYPE – Description

entrypol

TYPE – Description

entryresid

TYPE – Description

entrysiteid

TYPE – Description

exitpol

TYPE – Description

exitresid

TYPE – Description

exitsiteid

TYPE – Description

expert

TYPE – Description

max_sites

TYPE – Description

min_sites

TYPE – Description

nchains

TYPE – Description

spliceables

TYPE – Description

x2exit

TYPE – Description

x2orgn

TYPE – Description

init_segment_data()[source]

TODO: Summary

Raises:ValueError – Description
make_head()[source]

TODO: Summary

Returns:Description
Return type:TYPE
make_pose_chains(indices, position=None, pad=(0, 0), iseg=None, segments=None, cyclictrim=None)[source]

what a monster this has become. returns (segchains, rest) segchains elems are [enterexitchain] or, [enterchain, …, exitchain] rest holds other chains IFF enter and exit in same chain each element is a pair [pose, source] where source is (origin_pose, start_res, stop_res) cyclictrim specifies segments which are spliced across the symmetric interface. segments only needed if cyclictrim==True if cyclictrim, last segment will only be a single entry residue

Parameters:
  • indices (TYPE) – Description
  • position (None, optional) – Description
  • pad (tuple, optional) – Description
  • iseg (None, optional) – Description
  • segments (None, optional) – Description
  • cyclictrim (None, optional) – Description
Returns:

Description

Return type:

TYPE

make_tail()[source]

TODO: Summary

Returns:Description
Return type:TYPE
merge_idx(head, head_idx, tail, tail_idx)[source]

TODO: Summary

Parameters:
  • head (TYPE) – Description
  • head_idx (TYPE) – Description
  • tail (TYPE) – Description
  • tail_idx (TYPE) – Description
Returns:

Description

Return type:

TYPE

merge_idx_slow(head, head_idx, tail, tail_idx)[source]

TODO: Summary

Parameters:
  • head (TYPE) – Description
  • head_idx (TYPE) – Description
  • tail (TYPE) – Description
  • tail_idx (TYPE) – Description
Returns:

return joint index, -1 if head/tail pairing is invalid

Return type:

TYPE

same_bodies_as(other)[source]

TODO: Summary

Parameters:other (TYPE) – Description
Returns:Description
Return type:TYPE
split_idx(idx, head, tail)[source]

return indices for separate head and tail segments

Parameters:
  • idx (TYPE) – Description
  • head (TYPE) – Description
  • tail (TYPE) – Description
Returns:

Description

Return type:

TYPE

class worms.segments.Segments(segments)[source]

Bases: object

light wrapper around list of Segments

segments

TYPE – Description

index(val)[source]

TODO: Summary

Parameters:val (TYPE) – Description
Returns:Description
Return type:TYPE
split_at(idx)[source]

TODO: Summary

Parameters:idx (TYPE) – Description
Returns:Description
Return type:TYPE
class worms.segments.SpliceSite(sele, polarity, chain=None)[source]

Bases: object

TODO: Summary

chain

TYPE – Description

polarity

TYPE – Description

selections

TYPE – Description

resid(id, pose)[source]

TODO: Summary

Parameters:
  • id (TYPE) – Description
  • pose (TYPE) – Description
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

class worms.segments.Spliceable(body, sites, *, bodyid=None, min_seg_len=1, allowed_pairs=None)[source]

Bases: object

TODO: Summary

allowed_pairs

TYPE – Description

body

TYPE – Description

bodyid

TYPE – Description

chains

TYPE – Description

end_of_chain

TYPE – Description

min_seg_len

TYPE – Description

nsite

TYPE – Description

sites

TYPE – Description

start_of_chain

TYPE – Description

is_compatible(isite, ires, jsite, jres)[source]

TODO: Summary

Parameters:
  • isite (TYPE) – Description
  • ires (TYPE) – Description
  • jsite (TYPE) – Description
  • jres (TYPE) – Description
Returns:

Description

Return type:

TYPE

resids(isite)[source]

TODO: Summary

Parameters:isite (TYPE) – Description
Returns:Description
Return type:TYPE
sitepair_allowed(isite, jsite)[source]

TODO: Summary

Parameters:
  • isite (TYPE) – Description
  • jsite (TYPE) – Description
Returns:

Description

Return type:

TYPE

spliceable_positions()[source]

selection of resids, and map ‘global’ index to selected index

Returns:Description
Return type:TYPE
class worms.segments.Worms(segments, scores, indices, positions, criteria, detail)[source]

Bases: object

TODO: Summary

criteria

TYPE – Description

detail

TYPE – Description

indices

TYPE – Description

positions

TYPE – Description

score0

TYPE – Description

score0sym

TYPE – Description

scores

TYPE – Description

segments

TYPE – Description

splicepoint_cache

dict – Description

clear_caches()[source]

TODO: Summary

pose(which, *, align=True, end=None, only_connected='auto', join=True, cyclic_permute=None, cyclictrim=None, provenance=False, make_chain_list=False, **kw)[source]

makes a pose for the ith worm

splicepoints(which)[source]

TODO: Summary

Parameters:which (TYPE) – Description
Returns:Description
Return type:TYPE
splices(which)[source]

TODO: Summary

Parameters:which (TYPE) – Description
Returns:Description
Return type:TYPE
sympose(which, score=False, provenance=False, fullatom=False, asym_score_thresh=50, min_cell_spacing=130, *, parallel=False)[source]

TODO: Summary

Parameters:
  • which (TYPE) – Description
  • score (bool, optional) – Description
  • provenance (bool, optional) – Description
  • fullatom (bool, optional) – Description
  • parallel (bool, optional) – Description
  • asym_score_thresh (int, optional) – Description
Returns:

Description

Return type:

TYPE

Raises:

IndexError – Description

worms.segments.lineno()[source]

Returns the current line number in our program.

Returns:Description
Return type:TYPE

worms.util module

TODO: Summary

class worms.util.InProcessExecutor(*args, **kw)[source]

Bases: object

TODO: Summary

map(func, *iterables)[source]

TODO: Summary

Parameters:
  • func (TYPE) – Description
  • iterables – Description
Returns:

Description

Return type:

TYPE

submit(fn, *args, **kw)[source]

TODO: Summary

Parameters:
  • fn (TYPE) – Description
  • args – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

class worms.util.MultiRange(nside)[source]

Bases: object

TODO: Summary

len

TYPE – Description

nside

TYPE – Description

psum

TYPE – Description

class worms.util.NonFuture(result)[source]

Bases: object

TODO: Summary

result()[source]

TODO: Summary

Returns:Description
Return type:TYPE
worms.util.bigprod(iterable)[source]

TODO: Summary

Parameters:iterable (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.contig_idx_breaks[source]
worms.util.cpu_count()[source]

TODO: Summary

Returns:Description
Return type:TYPE
worms.util.dicts_to_items(inp)[source]

TODO: Summary

Parameters:inp (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.expand_array_if_needed[source]
worms.util.first_duplicate(segs)[source]

TODO: Summary

Parameters:segs (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.get_bb_coords(pose, which_resi=None)[source]

extract rif style stubs from rosetta pose

Parameters:
  • pose (TYPE) – Description
  • which_resi (None, optional) – Description
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.util.get_bb_stubs(pose, which_resi=None)[source]

extract rif style stubs from rosetta pose

Parameters:
  • pose (TYPE) – Description
  • which_resi (None, optional) – Description
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.util.get_chain_bounds(pose)[source]

TODO: Summary

Parameters:pose (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.get_symdata[source]

TODO – Summary

Parameters:name (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.get_symdata_modified(name, string_substitutions=None, scale_positions=None)[source]

TODO: Summary

Parameters:
  • name (TYPE) – Description
  • string_substitutions (None, optional) – Description
  • scale_positions (None, optional) – Description
Returns:

Description

Return type:

TYPE

worms.util.get_symfile_contents[source]

TODO – Summary

Parameters:name (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.hash_str_to_int(s)[source]
worms.util.infer_cyclic_symmetry(pose)[source]

TODO: Summary

Parameters:pose (TYPE) – Description
Raises:NotImplementedError – Description
worms.util.items_to_dicts(inp)[source]

TODO: Summary

Parameters:inp (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.no_overlapping_adjacent_residues(p)[source]

TODO: Summary

Parameters:p (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.no_overlapping_residues(p)[source]

TODO: Summary

Parameters:p (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.numpy_stub_from_rosetta_stub(rosstub)[source]

TODO: Summary

Parameters:rosstub (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.parallel_batch_map(pool, function, accumulator, batch_size, map_func_args, **kw)[source]

TODO: Summary

Parameters:
  • pool (TYPE) – Description
  • function (TYPE) – Description
  • accumulator (TYPE) – Description
  • batch_size (TYPE) – Description
  • map_func_args (TYPE) – Description
  • kw – passthru args
Yields:

TYPE – Description

worms.util.parallel_nobatch_map(pool, function, accumulator, batch_size, map_func_args, **kw)[source]

TODO: Summary

Parameters:
  • pool (TYPE) – Description
  • function (TYPE) – Description
  • accumulator (TYPE) – Description
  • batch_size (TYPE) – Description
  • map_func_args (TYPE) – Description
  • kw – passthru args
Yields:

TYPE – Description

worms.util.pose_bounds(pose, lb, ub)[source]

TODO: Summary

Parameters:
  • pose (TYPE) – Description
  • lb (TYPE) – Description
  • ub (TYPE) – Description
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.util.residue_coords(p, ir, n=3)[source]
worms.util.residue_sym_err(p, ang, ir, jr, n=1, axis=[0, 0, 1], verbose=0)[source]
worms.util.rosetta_stub_from_numpy_stub(npstub)[source]

TODO: Summary

Parameters:npstub (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.subpose(pose, lb, ub=-1)[source]

TODO: Summary

Parameters:
  • pose (TYPE) – Description
  • lb (TYPE) – Description
  • ub (TYPE, optional) – Description
Returns:

Description

Return type:

TYPE

worms.util.symfile_path(name)[source]

TODO: Summary

Parameters:name (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.tqdm_parallel_map(pool, function, accumulator, map_func_args, batch_size, **kw)[source]

TODO: Summary

Parameters:
  • pool (TYPE) – Description
  • function (TYPE) – Description
  • accumulator (TYPE) – Description
  • map_func_args (TYPE) – Description
  • batch_size (TYPE) – Description
  • kw – passthru args
worms.util.trim_pose(pose, resid, direction, pad=0)[source]

trim end of pose from direction, leaving <=pad residues beyond resid

Parameters:
  • pose (TYPE) – Description
  • resid (TYPE) – Description
  • direction (TYPE) – Description
  • pad (int, optional) – Description
Returns:

Description

Return type:

TYPE

Raises:

ValueError – Description

worms.util.unique_key(a, b=None)[source]
worms.util.unique_key_int32s(a, b)[source]
worms.util.worst_CN_connect(p)[source]

TODO: Summary

Parameters:p (TYPE) – Description
Returns:Description
Return type:TYPE
worms.util.xform_pose(xform, pose, lb=1, ub=-1)[source]

TODO: Summary

Parameters:
  • xform (TYPE) – Description
  • pose (TYPE) – Description
  • lb (int, optional) – Description
  • ub (TYPE, optional) – Description

worms.vertex module

TODO: Summary

worms.vertex.Vertex(bbs, dirn, bbids=None, min_seg_len=1, verbosity=0)[source]

Summary

Parameters:
  • bbs (TYPE) – Description
  • bbids (TYPE) – Description
  • dirn (TYPE) – Description
  • min_seg_len (TYPE) – Description
Returns:

Description

Return type:

TYPE

worms.vertex.vertex_single(bbstate, bbid, din, dout, min_seg_len, verbosity=0)[source]

build on bblock’s worth of vertex

worms.vis module

TODO: Summary

worms.vis.numcom

int – Description

worms.vis.numline

int – Description

worms.vis.numray

int – Description

worms.vis.numseg

int – Description

worms.vis.numvec

int – Description

worms.vis.showme_state

TYPE – Description

worms.vis.cgo_cyl(c1, c2, r, col=(1, 1, 1), col2=None)[source]

TODO: Summary

Parameters:
  • c1 (TYPE) – Description
  • c2 (TYPE) – Description
  • r (TYPE) – Description
  • col (tuple, optional) – Description
  • col2 (None, optional) – Description
Returns:

Description

Return type:

TYPE

worms.vis.cgo_lineabs(a, c, col=(1, 1, 1))[source]

TODO: Summary

Parameters:
  • a (TYPE) – Description
  • c (TYPE) – Description
  • col (tuple, optional) – Description
Returns:

Description

Return type:

TYPE

worms.vis.cgo_segment(c1, c2, col=(1, 1, 1))[source]

TODO: Summary

Parameters:
  • c1 (TYPE) – Description
  • c2 (TYPE) – Description
  • col (tuple, optional) – Description
Returns:

Description

Return type:

TYPE

worms.vis.cgo_sphere(c, r=1, col=(1, 1, 1))[source]

TODO: Summary

Parameters:
  • c (TYPE) – Description
  • r (int, optional) – Description
  • col (tuple, optional) – Description
Returns:

Description

Return type:

TYPE

worms.vis.format_atom(atomi=0, atomn='ATOM', idx=' ', resn='RES', chain='A', resi=0, insert=' ', x=0, y=0, z=0, occ=0, b=0)[source]
worms.vis.is_rosetta_pose(to_show)[source]
worms.vis.pymol_load(to_show, state=None, name=None, **kw)[source]
worms.vis.pymol_load_pose(pose, name)[source]
worms.vis.pymol_xform(name, xform)[source]
worms.vis.show_with_axis(worms, idx=0)[source]

TODO: Summary

Parameters:
  • worms (TYPE) – Description
  • idx (int, optional) – Description
worms.vis.show_with_z_axes(worms, idx=0, only_connected=0, **kw)[source]

TODO: Summary

Parameters:
  • worms (TYPE) – Description
  • idx (int, optional) – Description
  • only_connected (int, optional) – Description
  • kw – passthru args
worms.vis.showcom(sel='all')[source]

TODO: Summary

Parameters:sel (str, optional) – Description
worms.vis.showcyl(c1, c2, r, col=(1, 1, 1), col2=None, lbl='')[source]

TODO: Summary

Parameters:
  • c1 (TYPE) – Description
  • c2 (TYPE) – Description
  • r (TYPE) – Description
  • col (tuple, optional) – Description
  • col2 (None, optional) – Description
  • lbl (str, optional) – Description
worms.vis.showline(a, c, col=(1, 1, 1), lbl='')[source]

TODO: Summary

Parameters:
  • a (TYPE) – Description
  • c (TYPE) – Description
  • col (tuple, optional) – Description
  • lbl (str, optional) – Description
worms.vis.showlineabs(a, c, col=(1, 1, 1), lbl='')[source]

TODO: Summary

Parameters:
  • a (TYPE) – Description
  • c (TYPE) – Description
  • col (tuple, optional) – Description
  • lbl (str, optional) – Description
worms.vis.showme(*args, how='pymol', **kw)[source]

TODO: Summary

Parameters:
  • args – passthru args
  • how (str, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

Raises:

NotImplementedError – Description

worms.vis.showme_pymol(what, headless=False, block=False, **kw)[source]

TODO: Summary

Parameters:
  • what (TYPE) – Description
  • headless (bool, optional) – Description
  • block (bool, optional) – Description
  • kw – passthru args
Returns:

Description

Return type:

TYPE

worms.vis.showsegment(c1, c2, col=(1, 1, 1), lbl='')[source]

TODO: Summary

Parameters:
  • c1 (TYPE) – Description
  • c2 (TYPE) – Description
  • col (tuple, optional) – Description
  • lbl (str, optional) – Description
worms.vis.showsphere(c, r=1, col=(1, 1, 1), lbl='')[source]

TODO: Summary

Parameters:
  • c (TYPE) – Description
  • r (int, optional) – Description
  • col (tuple, optional) – Description
  • lbl (str, optional) – Description
worms.vis.showvecfrompoint(a, c, col=(1, 1, 1), lbl='')[source]

TODO: Summary

Parameters:
  • a (TYPE) – Description
  • c (TYPE) – Description
  • col (tuple, optional) – Description
  • lbl (str, optional) – Description

Module contents

Top-level package for worms.

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/willsheffler/worms/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.

Write Documentation

worms could always use more documentation, whether as part of the official worms docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/willsheffler/worms/issues.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here’s how to set up worms for local development.

  1. Fork the worms repo on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:your_name_here/worms.git
    
  3. Install your local copy into a conda environment

    $ conda env update

  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass the tests:

    $ pytest
    

    To get flake8 and tox, just pip install them into your virtualenv.

  6. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
  3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check https://travis-ci.org/willsheffler/worms/pull_requests and make sure that the tests pass for all supported Python versions.

Tips

Hook up your editor to run this (see your editor’s docs…):

$ python util/runtests.py CURRENT_FILE

Credits —-~~~~~ - Will Sheffler - Ivan Vulovic - Una Natterman - David Baker - Yang Hisa - Rubal Mout

History

0.1.24 (2018-04-25)

  • change two-stage xindex thershold multiplier for 1st stage from 1.25 to 2.0

0.1.23 (2018-04-24)

  • add initial draft of Una’s criteria for P213 xtal

0.1.22 (2018-04-20)

  • add initial draft of Una’s criteria for P3, P4 and P6 layers

0.1.21 (2018-04-19)

  • peace sign heterotrimer site compatibility bug fix
  • xindex search now stores lists instead of one-per-bin

0.1.20 (2018-04-16)

  • add more dihedral sym files

0.1.19 (2018-04-6)

  • minor performance impovements in hash-index based search

0.1.17 (2018-04-4)

  • hash-index based search for Cyclic(…, origin_seg=…)

0.1.16 (2018-03-15)

  • I52 symmetry bug fix

0.1.15 (2018-03.05)

  • add NullCriteria that always returns 0 err

0.1.14 (2018-02-28)

  • fix provenance bug in ‘cyclic entry’ cases
  • try to make serialization of Segments more efficient

0.1.13 (2018-02-16)

  • raise exception if system too large

0.1.12 (2018-02-16)

  • partial bignum fix

0.1.11 (2018-02-15)

  • fix memory bug
  • make distribution work better
  • maybe fix pose bug, still some logic err, but maybe ok

0.1.10 (2018-02-15)

  • add max_results option to grow
  • fix C2 sym bug
  • fix xform axis cen bug
  • fix memory “bug” with batch parallel processing

0.1.9 (2018-02-08)

  • add max_samples option to grow

0.1.8 (2018-02-07)

  • origin_seg bug fix

0.1.6 (2018-02-01)

  • middle-to-end cyclic fusions working
  • add pretty logo of mid-to-end C3 fusion

0.1.6 (2018-02-01)

  • bug fix in fullatom option

0.1.5 (2018-02-01)

  • add fullatom option to Worms.sympose
  • cyclic premutation working for simple beginning-to-end case

0.1.4 (2018-02-01)

  • pypi deplolment derp

0.1.3 (2018-02-01)

  • pypi deplolment derp

0.1.2 (2018-01-23)

  • Add __main__ for module to run tests
  • move worms.pdb to worms.data because pdb is kinda reserved
  • move utility stuff to util.py
  • add some interactive visualization utils for debugging

0.1.1 (2018-01-23)

  • First release on PyPI.

Indices and tables