pyMBE provides tools to facilitate building up molecules with complex architectures in the Molecular Dynamics software ESPResSo. For an up-to-date API documention please check our website:
new function 'create_bond_in_esspresso' is an internal tool for creating the bond_object required for the former function 'define_bond'.
define_bond now takes as arguments:
bond_type (str): similar to the previous function, valid types harmonic and FENE.
k , (obj): Magnitude of the bond. It should have units of energy/length**2 using the pmb.units UnitRegistry.
r_0 (obj): Equilibrium bond length. It should have units of length using the pmb.units UnitRegistry.
d_r_max (obj, optional). Maximal stretching length for FENE. It should have units of length using the pmb.units UnitRegistry. It is optional and the default value is 'None' considering that for a harmonic bond is not necessary this parameter. In the case that the user specifies FENE but does not provide a value for this argument then a ValueError will raise reporting that such parameter is missing.
particle_pairs (lst): list of the names of each pair of particles to be bonded.
the argument bond_object was removed because now the new function generates it internally.
Additionally, the script 'test_new_bond_function.py' was created for testing the new implementation. The script generates a short polymer and compares the filtered pymbe dataframe ('bonds') using both version of pyMBE (the current version of pyMBE renamed as 'old_pyMBE.py' and the one with the changes 'pyMBE.py').
Fixes #20
List of changes:
new function 'create_bond_in_esspresso' is an internal tool for creating the bond_object required for the former function 'define_bond'.
define_bond now takes as arguments:
bond_type (
str
): similar to the previous function, valid types harmonic and FENE.k , (
obj
): Magnitude of the bond. It should have units of energy/length**2 using thepmb.units
UnitRegistry.r_0 (
obj
): Equilibrium bond length. It should have units of length using thepmb.units
UnitRegistry.d_r_max (
obj
, optional). Maximal stretching length for FENE. It should have units of length using thepmb.units
UnitRegistry. It is optional and the default value is 'None' considering that for a harmonic bond is not necessary this parameter. In the case that the user specifies FENE but does not provide a value for this argument then a ValueError will raise reporting that such parameter is missing.particle_pairs (
lst
): list of thenames
of each pair ofparticles
to be bonded.the argument bond_object was removed because now the new function generates it internally.
Additionally, the script 'test_new_bond_function.py' was created for testing the new implementation. The script generates a short polymer and compares the filtered pymbe dataframe ('bonds') using both version of pyMBE (the current version of pyMBE renamed as 'old_pyMBE.py' and the one with the changes 'pyMBE.py').