Skip to content

Commit

Permalink
Merge pull request #195 from andrewtarzia/docsfix
Browse files Browse the repository at this point in the history
Update docs with try.
  • Loading branch information
andrewtarzia authored Dec 13, 2024
2 parents 27d25af + a3db314 commit 4e2e151
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ dependencies:
- dgl
- python=3.11
- pip
- rdkit==2024.3.4
- espaloma_charge
11 changes: 8 additions & 3 deletions docs/source/cage_optimisation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,14 @@ to get the structure below in a few minutes!
import moldoc.molecule as molecule
import stk

cage = stk.BuildingBlock.init_from_file(
'source/_static/openmm_opt_file.mol',
)
try:
cage = stk.BuildingBlock.init_from_file(
'source/_static/openmm_opt_file.mol',
)
except OSError:
cage = stk.BuildingBlock.init_from_file(
'_static/openmm_opt_file.mol',
)

moldoc_display_molecule = molecule.Molecule(
atoms=(
Expand Down
22 changes: 16 additions & 6 deletions docs/source/hg_optimisation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ cage. And we build to `stk.host_guest.Guest` objects.
import moldoc.molecule as molecule
import stk

hg_complex = stk.BuildingBlock.init_from_file(
'source/_static/unopt_hgcomplex.mol',
)
try:
hg_complex = stk.BuildingBlock.init_from_file(
'source/_static/unopt_hgcomplex.mol',
)
except OSError:
hg_complex = stk.BuildingBlock.init_from_file(
'_static/unopt_hgcomplex.mol',
)

moldoc_display_molecule = molecule.Molecule(
atoms=(
Expand Down Expand Up @@ -166,9 +171,14 @@ to get the structure below in a few minutes!
import moldoc.molecule as molecule
import stk

hg_complex = stk.BuildingBlock.init_from_file(
'source/_static/opt_complex.mol',
)
try:
hg_complex = stk.BuildingBlock.init_from_file(
'source/_static/opt_complex.mol',
)
except OSError:
hg_complex = stk.BuildingBlock.init_from_file(
'_static/opt_complex.mol',
)

moldoc_display_molecule = molecule.Molecule(
atoms=(
Expand Down

0 comments on commit 4e2e151

Please sign in to comment.