Skip to content

Commit b213c94

Browse files
Update README.md
1 parent 73d9e8b commit b213c94

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ The MSIBI package is designed to be very object oriented. Any force optimization
2929

3030
MSIBI uses [Hoomd-Blue](https://hoomd-blue.readthedocs.io/en/latest/) to run optimization simulations. It is not required that you be familiar with Hoomd to use MSIBI as the simulation script is automatically generated and ran. However, it is required that you pass in the choice of [Hoomd method](https://hoomd-blue.readthedocs.io/en/latest/module-md-methods.html), [Hoomd neighbor list](https://hoomd-blue.readthedocs.io/en/latest/module-md-nlist.html), and [Hoomd thermostat](https://hoomd-blue.readthedocs.io/en/latest/module-md-methods-thermostats.html) to the `msibi.optimize.MSIBI` class. Since MSIBI utilizes Hoomd-Blue, this means that MSIBI can run on GPUs, see [Hoomd's installation guide](https://hoomd-blue.readthedocs.io/en/latest/installation.html) for instructions on ensuring your environment includes a GPU build of hoomd.
3131

32-
### Quick Example:
32+
### Quick Example: Optimizing bond-stretching
3333
Here is a simple example using MSIBI to learn a bond-stretching force from a single state point:
3434

3535
```python
3636
# This is the context/management class for MSIBI
3737
# Set simulation parameters, call `add_state` and `add_force` methods to store other MSIBI objects.
3838
optimizer = MSIBI(
3939
nlist=hoomd.md.nlist.Cell,
40-
integrator_method=hoomd.md.methods.ConstantVolume,
40+
integrator_method=hoomd.md.methods.ConstantVolume,
4141
thermostat=hoomd.md.methods.thermostats.MTTK,
42-
thermostat_kwargs={"tau": 0.1},
43-
method_kwargs={},
42+
thermostat_kwargs={"tau": 0.1},
43+
method_kwargs={},
4444
dt=0.0001,
45-
gsd_period=int(1e3)
45+
gsd_period=int(1e4)
4646
)
4747

4848
# Create a State instance, pass in a path to the target trajectory
@@ -65,29 +65,28 @@ optimizer.run_optimization(n_iterations=10, n_steps=2e5)
6565
AA_bond.plot_distribution_comparison(state=stateA)
6666
AB_bond.plot_distribution_comparison(state=stateA)
6767

68-
<<<<<<< HEAD
69-
# Run 20 MSIBI iterations
70-
optimizer.run_optimization(n_steps=2e6, n_iterations=20)
71-
pairAA.save_potential("pairAA.csv")
68+
# Save potentials
69+
AA_bond.save_potential("AA_bond.csv")
70+
AB_bond.save_potential("AB_bond.csv")
7271
```
7372

74-
### Example: Multiple states, multiple forces
73+
### Quick Example: Multiple states, multiple forces
7574
- Here is an example of learning a pair potential using multiple state points and forces.
7675
- In this example, we set fixed bond and angle potentials that are included during iteration simulations.
7776
- The bond potential will set a fixed harmonic force, while the angle potential will be set from a table potential file.
7877
- This illustrates a use case of stringing together multiple MSIBI optimizations.
79-
- For example, one MSIBI optimization can be used to learn and obtain a coarse-grained angle potential table file which can then be set and held fixed while learning pair potentials in a subsequent MSIBI optimization.
78+
- For example, one MSIBI optimization can be used to learn and obtain a coarse-grained angle potential table file which can then be set and held fixed while learning pair potentials in a subsequent MSIBI optimization.
8079

8180
```python
8281
import hoomd
8382
from msibi import MSIBI, State, Pair, Bond, Angle
8483

8584
optimizer = MSIBI(
8685
nlist=hoomd.md.nlist.Cell,
87-
integrator_method=hoomd.md.methods.ConstantVolume,
86+
integrator_method=hoomd.md.methods.ConstantVolume,
8887
thermostat=hoomd.md.methods.thermostats.MTTK,
89-
thermostat_kwargs={"tau": 0.1},
90-
method_kwargs={},
88+
thermostat_kwargs={"tau": 0.1},
89+
method_kwargs={},
9190
dt=0.0001,
9291
gsd_period=int(1e4)
9392
)

0 commit comments

Comments
 (0)