@@ -739,8 +739,8 @@ impl PyMolecule {
739
739
Ok ( n)
740
740
}
741
741
742
- #[ pyo3( signature = ( ignore_pbc=false , bond_tolerance=None , cov_radius_scale_factor =None , bonding_scheme=None ) ) ]
743
- #[ pyo3( text_signature = "(ignore_pbc=False, bond_tolerance=None, radius_scale_factor =None, bonding_scheme=None)" ) ]
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)" ) ]
744
744
/// Recalculates all bonds in molecule based on interatomic
745
745
/// distances and covalent radii. For periodic system, the bonds
746
746
/// are determined in miniumu image convention.
@@ -749,27 +749,23 @@ impl PyMolecule {
749
749
/// * ignore_pbc: force to ignore periodicity when search nearest
750
750
/// neighbors. The default is False.
751
751
/// * bonding_scheme: the bonding scheme for rebond. Avaialbe scheme
752
- /// includes jmol and multiwfn .
752
+ /// includes jmol, multiwfn and vmd .
753
753
/// * bond_tolerance: the bonding tolerance used in jmol scheme. The
754
754
/// default value is 0.45.
755
- /// * cov_radius_scale_factor : set the scale factor for covalent
756
- /// radius for perception of bond in multiwfn scheme. The
757
- /// default value is 1.15.
755
+ /// * bond_scale_factor : set the scale factor for covalent or vdw radius
756
+ /// for bond perception, only relevant in multiwfn or vmd scheme. The
757
+ /// default value is 1.15 for multiwfn and 0.6 for vmd .
758
758
pub fn rebond (
759
759
& mut self ,
760
760
ignore_pbc : bool ,
761
761
bond_tolerance : Option < f64 > ,
762
- cov_radius_scale_factor : Option < f64 > ,
762
+ bond_scale_factor : Option < f64 > ,
763
763
bonding_scheme : Option < String > ,
764
764
) {
765
765
let mut options = Molecule :: rebond_options ( ) ;
766
766
options. ignore_pbc = ignore_pbc;
767
- if let Some ( v) = bond_tolerance {
768
- options. bond_tolerance = v;
769
- }
770
- if let Some ( v) = cov_radius_scale_factor {
771
- options. cov_radius_scale_factor = v;
772
- }
767
+ options. bond_tolerance = bond_tolerance;
768
+ options. bond_scale_factor = bond_scale_factor;
773
769
if let Some ( s) = bonding_scheme {
774
770
options. set_bonding_scheme ( & s) ;
775
771
}
0 commit comments