The main new feature is a method `StrandBuilder.move` and parameter `move` in the existing methods `StrandBuilder.cross` and `StrandBuilder.loopout`. `move` is like `to`, but is a relative offset rather than an absolute offset.
For example, to make a strand that, starting at helix 0, offset 123, goes 8 bases forward, then crosses over to the same offset on helix 1 and goes 16 bases in reverse, then crosses over to helix 2 (but the crossover jumps 2 offsets back), then goes 10 bases forward:
python
(design.strand(0, 123)
.move(8)
.cross(1)
.move(-16)
.cross(2, move=-2)
.move(10))
![image](https://user-images.githubusercontent.com/19274365/91471756-55ece080-e84b-11ea-82c3-c345c42e1485.png)
where the parameter to the method `move`, as well as the parameter named `move`, are relative to the current offset. This is equivalent to the more cumbersome absolute offsets with `to`:
python
(design.strand(0, 123)
.to(131)
.cross(1)
.to(115)
.cross(2, offset=113)
.to(123))
Commits
- [[37db033](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/commit/37db033c9827c1ea9390210c8bc26ec4dc0976cd)]: updated tutorial with correct parameter names for Crossover constructor (David Doty) [#129](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/pull/129)
- [[0808d88](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/commit/0808d88b6b298286224cd2b63350cb4479cfb436)]: fixed code display in docstrings (David Doty) [#129](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/pull/129)
- [[2499733](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/commit/2499733a64fe328befe948e1fd3577ff2f2b9851)]: added move method to StrandBuilder and move parameter to StrandBuilder.cross and StrandBuilder.loopout to enable relative (instead of absolute) specification of offsets when creating Domains through chained methodso (David Doty) [#129](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/pull/129)
- [[0b43e14](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/commit/0b43e14f36464d5672857f5ace455d9886ffa7ac)]: added examples; bumped version (David Doty) [#129](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/pull/129)
- [[4760354](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/commit/4760354cb189915fd379f33bcf5fd2e0d15d8b3f)]: fixed unit test now that positions are automatically created in Helix when grid is None (David Doty) [#129](https://github.com/UC-Davis-molecular-computing/scadnano-python-package/pull/129)