• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mosdef-hub / mbuild / 1316 / 3
90%
master: 90%

Build:
DEFAULT BRANCH: master
Ran 11 Jan 2018 01:05AM UTC
Files 47
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Jan 2018 11:25PM UTC coverage: 89.308% (+0.7%) from 88.56%
PYTHON_VERSION=2.7

push

travis-ci

web-flow
Adding/removing Ports when bonds are removed/added (#390)

* Add ports when a bond is removed

* Remove ports when bond is added

* Add pytest fixture for hydrogen

* Add tests for port behavior when adding/removing bonds

* Update name of ports created when bond removed

* Updating tests to conform to new port behavior

* Updated unit tests to new bond/port functionality

* Removed deepcopy from bond vector

* Fixed bug in alignment of subports in __init__

Ports along antiparallel vectors should have 'up' and 'down' subports
at equivalent positions, except for reverse labels (i.e. the 'up'
subport of a port oriented in one direction will have the same xyz
positions as the 'down' port oriented in the opposite direction).
However, the previous routine to initialize the subports performed
this incorrectly. The committed changes fix this functionality. The
alignment issues appeared to occur if the z-coordinate of the
orientation vector was less than zero. I could not figure out the
proper rotations to fix this, so as a workaround, in cases where the
z-coordinate of the orientation vector is less than zero, the subports
are created as if the orientation vector was in the opoosite direction
and the labels are switched.

Additional changes include updating the docstring of the Port __init__,
changing the default `orientation` from `None` to `[0, 1, 0]` (since
this was done internally anyhow), rotating the port 180 degrees around
z instead of x if `[0, -1, 0]` is provided as the orientation, and
replacing `np.array_equal` to `np.allclose` when checking for specific
orientation vectors.

Highlights
* `np.array_equal` replaced with `np.allclose` in orientation checks
* Proper handling of subport positioning when orientation vectors with
  a -z coordinate are passed
* Updated docstring of Port __init__
* Default `orientation` changed from `None` to `[0, 1, 0]`
* Rotating Port 180 degrees around z instead of x if `[0, -1, 0]` is
  provided as the orientation.

* Added calc_dihedral function to utils

* Added pytest fixtures for CHF and reconnecting

Pytest fixtures have been added for a CHF Compound and a routine
for connecting two Compounds, disconnecting them, and reconnecting
them.

* Added tests for proper subport orientation

Tests have been added to ensure that ports created along anti-
parallel orientation vectors will feature 'up' and 'down' subports
with equivalent positions and opposite labels. These tests cover
the edge cases of orientations along the three coordinate axes as
well as along 15 random vectors.

* Added tests for reconnecting Compounds

Tests have been added that ensure that when a bond is broken
between two Compounds and the Compounds are reconnected, that the
relative orientation of the Compounds is unchanged. This is tested
by connecting two CHF molecules and checking that the FCCF dihedral
remains the same after disconnecting the reconnecting the molecules.
These tests cover the edge cases of connections along the three
coordinate axes as well as along five random vectors.

* Replace math.isclose with numpy.isclose

* Removed mutable default arg, minor syntax changes

The default argument for `orientation` in `Port.__init__` has
been changed from `[0, 1, 0]` to `None`. If `orientation` is `None`
it is changed to `[0, 1, 0]` within the constructor.

* Removed mutable default for `orientation`
* Convert `orientation` to a numpy array
* Minor syntax change

* Remove stray - sign

* Travis debugging

* Cleaning up rigid tests

* Rotate `down` subport around the normal of y and `orientation`

* Added test to ensure Compound reproducibility

Added a test that creates an alkane monolayer and compares with
an existing monolayer that has been saved in PDB format. This
test checks to see if a PDB written using the current branch
matches that of the reference file.

* Added monolayer.pdb reference file

* Cast default_direction as np.array

* Updated monolayer.pdb ref test to use difflib

* Extent timeout time for test_examples to 2 minutes

2556 of 2862 relevant lines covered (89.31%)

0.89 hits per line

Source Files on job 1316.3 (PYTHON_VERSION=2.7)
  • Tree
  • List 0
  • Changed 8
  • Source Changed 4
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1316
  • Travis Job 1316.3
  • 1b4a2a90 on github
  • Prev Job for PYTHON_VERSION=2.7 on master (#1314.3)
  • Next Job for PYTHON_VERSION=2.7 on master (#1318.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc