use pyo3::prelude::*;
pub fn register_module(py: Python<'_>, parent_module: &PyModule) -> PyResult<()>
{
let lennard_jones = PyModule::new(py, "lennard_jones")?;
super::thermodynamics::py::register_module(py, lennard_jones)?;
parent_module.add_submodule(lennard_jones)?;
lennard_jones.add_class::<LENNARDJONESFJC>()?;
Ok(())
}
#[pyclass]
pub struct LENNARDJONESFJC
{
#[pyo3(get)]
pub hinge_mass: f64,
#[pyo3(get)]
pub link_length: f64,
#[pyo3(get)]
pub number_of_links: u8,
#[pyo3(get)]
pub link_stiffness: f64,
#[pyo3(get)]
pub thermodynamics: super::thermodynamics::py::LENNARDJONESFJC
}
#[pymethods]
impl LENNARDJONESFJC
{
#[new]
pub fn init(number_of_links: u8, link_length: f64, hinge_mass: f64, link_stiffness: f64) -> Self
{
LENNARDJONESFJC
{
hinge_mass,
link_length,
number_of_links,
link_stiffness,
thermodynamics: super::thermodynamics::py::LENNARDJONESFJC::init(number_of_links, link_length, hinge_mass, link_stiffness)
}
}
}