-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path__init__.py
More file actions
123 lines (92 loc) · 3.19 KB
/
Copy path__init__.py
File metadata and controls
123 lines (92 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
######################################################################
# BioSimSpace: Making biomolecular simulation a breeze!
#
# Copyright: 2017-2025
#
# Authors: Lester Hedges <lester.hedges@gmail.com>
#
# BioSimSpace is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BioSimSpace is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BioSimSpace. If not, see <http://www.gnu.org/licenses/>.
#####################################################################
"""
.. currentmodule:: BioSimSpace.Solvent
Functions
=========
.. autosummary::
:toctree: generated/
addIons
ions
solvate
spc
spce
tip3p
tip4p
tip5p
opc
waterModels
Examples
========
Print the list of supported water models.
.. code-block:: python
import BioSimSpace as BSS
print(BSS.Solvent.waterModels())
Solvate a molecule in a 5 :class:`nanometer <BioSimSpace.Units.Length.nanometer>`
periodic box of TIP3P water with an ion concentration of 0.1 mol per litre.
.. code-block:: python
import BioSimSpace as BSS
# Load a system and extract the first molecule.
files = BSS.IO.expand(BSS.tutorialUrl(), ["ala.top", "ala.crd"], ".bz2")
molecule = BSS.IO.readMolecules(files)[0]
# Solvate the molecule.
solvated = BSS.Solvent.tip3p(
molecule=molecule,
box=3*[5*BSS.Units.Length.nanometer],
ion_conc=0.1
)
The same as above, but instead passing "TIP3P" as an argument to the
:class:`solvate <BioSimSpace.Solvent.solvate>` function. This function should
be used in any interoperable workflow :class:`Node <BioSimSpace.Gateway.Node>`
where the water model is specified as an input requirement by the user.
.. code-block:: python
import BioSimSpace as BSS
# Load a system and extract the first molecule.
files = BSS.IO.expand(BSS.tutorialUrl(), ["ala.top", "ala.crd"], ".bz2")
molecule = BSS.IO.readMolecules(files)[0]
# Solvate the molecule.
solvated = BSS.Solvent.solvate(
"tip3p", molecule=molecule,
box=3*[5*BSS.Units.Length.nanometer],
ion_conc=0.1
)
Solvate the molecule with a shell of at least 2 nanometers of SPC water.
.. code-block:: python
import BioSimSpace as BSS
# Load a system and extract the first molecule.
files = BSS.IO.expand(BSS.tutorialUrl(), ["ala.top", "ala.crd"], ".bz2")
molecule = BSS.IO.readMolecules(files)[0]
# Solvate the molecule.
solvated = BSS.Solvent.spc(
"tip3p", molecule=molecule,
shell=2*BSS.Units.Length.nanometer
)
Create a 50 :class:`angstrom <BioSimSpace.Units.Length.angstrom>` periodic
box of pure SPC/E water.
.. code-block:: python
import BioSimSpace as BSS
water = BSS.Solvent.spce(box=3*[50*BSS.Units.Length.angstrom])
"""
import sire as _sr
_sr.use_new_api()
del _sr
from ._ions import *
from ._solvent import *