@@ -90,6 +90,7 @@ def merge(
9090 The merged molecule.
9191 """
9292 from sire .legacy import CAS as _SireCAS
93+ from sire .legacy import IO as _SireIO
9394 from sire .legacy import MM as _SireMM
9495 from sire .legacy import Base as _SireBase
9596 from sire .legacy import Mol as _SireMol
@@ -1178,23 +1179,22 @@ def merge(
11781179 edit_mol .set_property ("connectivity0" , conn0 )
11791180 edit_mol .set_property ("connectivity1" , conn1 )
11801181
1181- # Create the CLJNBPairs matrices.
1182- ff = molecule0 .property (ff0 )
1183-
1184- # Create the new intrascale matrices.
1185- scale_factor_14 = _SireMM .CLJScaleFactor (
1186- ff .electrostatic14_scale_factor (), ff .vdw14_scale_factor ()
1182+ # Merge the intrascale properties of the two molecules.
1183+ merged_intrascale = _SireIO .mergeIntrascale (
1184+ molecule0 .property ("intrascale" ),
1185+ molecule1 .property ("intrascale" ),
1186+ edit_mol .info (),
1187+ mol0_merged_mapping ,
1188+ mol1_merged_mapping ,
11871189 )
1188- clj_nb_pairs0 = _SireMM .CLJNBPairs (conn0 , scale_factor_14 )
1189- clj_nb_pairs1 = _SireMM .CLJNBPairs (conn1 , scale_factor_14 )
11901190
11911191 # Store the two molecular components.
11921192 edit_mol .set_property ("molecule0" , molecule0 )
11931193 edit_mol .set_property ("molecule1" , molecule1 )
11941194
11951195 # Set the "intrascale" properties.
1196- edit_mol .set_property ("intrascale0" , clj_nb_pairs0 )
1197- edit_mol .set_property ("intrascale1" , clj_nb_pairs1 )
1196+ edit_mol .set_property ("intrascale0" , merged_intrascale [ 0 ] )
1197+ edit_mol .set_property ("intrascale1" , merged_intrascale [ 1 ] )
11981198
11991199 # Set the "forcefield" properties.
12001200 edit_mol .set_property ("forcefield0" , molecule0 .property (ff0 ))
0 commit comments