@@ -739,8 +739,10 @@ impl PyMolecule {
739
739
Ok ( n)
740
740
}
741
741
742
- #[ pyo3( signature = ( ignore_pbc=false , bond_tolerance=None , bond_scale_factor=None , bonding_scheme=None ) ) ]
743
- #[ pyo3( text_signature = "(ignore_pbc=False, bond_tolerance=None, bond_scale_factor=None, bonding_scheme=None)" ) ]
742
+ #[ pyo3( signature = ( ignore_pbc=false , bond_tolerance=None , bond_scale_factor=None , bonding_scheme=None , distance_cutoff=None ) ) ]
743
+ #[ pyo3(
744
+ text_signature = "(ignore_pbc=False, bond_tolerance=None, bond_scale_factor=None, bonding_scheme=None, distance_cutoff=None)"
745
+ ) ]
744
746
/// Recalculates all bonds in molecule based on interatomic
745
747
/// distances and covalent radii. For periodic system, the bonds
746
748
/// are determined in miniumu image convention.
@@ -755,17 +757,21 @@ impl PyMolecule {
755
757
/// * bond_scale_factor: set the scale factor for covalent or vdw radius
756
758
/// for bond perception, only relevant in multiwfn or vmd scheme. The
757
759
/// default value is 1.15 for multiwfn and 0.6 for vmd.
760
+ /// * distance_cutoff: the nearest neighbor search distance cutoff. The
761
+ /// default value is 3.6
758
762
pub fn rebond (
759
763
& mut self ,
760
764
ignore_pbc : bool ,
761
765
bond_tolerance : Option < f64 > ,
762
766
bond_scale_factor : Option < f64 > ,
763
767
bonding_scheme : Option < String > ,
768
+ distance_cutoff : Option < f64 > ,
764
769
) {
765
770
let mut options = Molecule :: rebond_options ( ) ;
766
771
options. ignore_pbc = ignore_pbc;
767
772
options. bond_tolerance = bond_tolerance;
768
773
options. bond_scale_factor = bond_scale_factor;
774
+ options. distance_cutoff = distance_cutoff;
769
775
if let Some ( s) = bonding_scheme {
770
776
options. set_bonding_scheme ( & s) ;
771
777
}
0 commit comments