This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PyCall | |
# Change that to whatever packages you need. | |
const PACKAGES = ["pyyaml"] | |
# Import pip | |
try | |
@pyimport pip | |
catch | |
# If it is not found, install it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Potential { | |
fn energy(&self) -> f64; | |
} | |
// This is just a marker trait, to know which potentials can be used as pair | |
// potentials. I also have AnglePotential, GlobalPotential, ... | |
trait PairPotential: Potential {} | |
impl Clone for Box<PairPotential> { | |
fn clone(&self) -> Box<PairPotential> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pairs: # Non bonded atoms pairs | |
- atoms: [*, *] # Default value | |
type: NullPotential | |
- atoms: [He, He] | |
type: LennardJones | |
sigma: 3.4 A | |
epsilon: 0.45 kJ/mol | |
- atoms: [He, Ar] | |
type: LennardJones | |
sigma: 2.8 A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Foo.hpp" | |
#include <iostream> | |
using namespace std; | |
Foo::Foo(int _a, int _b): a(_a), b(_b){ | |
cout << "C++ side, constructor" << endl; | |
} | |
Foo::~Foo(){ |
NewerOlder