Skip to content

Commit 41f7985

Browse files
Luthafantoinewdg
authored andcommitted
Only allow the lj key for Lennard-Jones input (#100)
As discussed in #99.
1 parent bbdddcb commit 41f7985

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

doc/src/input/potentials.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ The Lennard-Jones potential is a classical potential for pair interactions
3737
expressed as: $$ V(x) = 4 \epsilon \left[\left(\frac{\sigma}{x}\right)^{12} -
3838
\left(\frac{\sigma}{x}\right)^6\right].$$
3939

40-
The Lennard-Jones potential is defined using the `lj` or `lennardjones` key. The
40+
The Lennard-Jones potential is defined using the `lj` key. The
4141
parameters are `sigma` ($\sigma$) and `epsilon` ($\epsilon$), which should be
4242
provided as strings.
4343

4444
```toml
4545
[[pairs]]
4646
atoms = ["O", "O"]
47-
lennardjones = {sigma = "3.16 A", epsilon = "0.155 kcal/mol"}
47+
lj = {sigma = "3.16 A", epsilon = "0.155 kcal/mol"}
4848
```
4949

5050
## Buckingham potential

src/input/src/interactions/pairs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ fn read_pair_potential(pair: &Table) -> Result<Box<PairPotential>> {
209209
match key {
210210
"null" => Ok(Box::new(try!(NullPotential::from_toml(table)))),
211211
"harmonic" => Ok(Box::new(try!(Harmonic::from_toml(table)))),
212-
"lj" | "lennardjones" => Ok(Box::new(try!(LennardJones::from_toml(table)))),
212+
"lj" => Ok(Box::new(try!(LennardJones::from_toml(table)))),
213213
"buckingham" => Ok(Box::new(try!(Buckingham::from_toml(table)))),
214214
"born" => Ok(Box::new(try!(BornMayerHuggins::from_toml(table)))),
215215
other => Err(

0 commit comments

Comments
 (0)