@@ -1102,8 +1102,8 @@ def interface(
1102
1102
trajectories ,
1103
1103
topology = None ,
1104
1104
fragments = 'lig_resSeq+' ,
1105
- frag_idxs_group_1 = None ,
1106
- frag_idxs_group_2 = None ,
1105
+ interface_selection_1 = None ,
1106
+ interface_selection_2 = None ,
1107
1107
AA_selection = None ,
1108
1108
GPCR_UniProt = "None" ,
1109
1109
CGN_UniProt = "None" ,
@@ -1159,8 +1159,8 @@ def interface(
1159
1159
are separate, i.e. there might be six chains but
1160
1160
one can specify to compute the interface between
1161
1161
chains [0,1] vs [2,3]. Read more in the
1162
- documentation for `fragments`, `frag_idxs_group_1 `,
1163
- and `frag_idxs_group_2 `.
1162
+ documentation for `fragments`, `interface_selection_1 `,
1163
+ and `interface_selection_2 `.
1164
1164
1165
1165
One can further refine the fragment selection
1166
1166
with an aminoacid (AA) selection using
@@ -1253,26 +1253,44 @@ def interface(
1253
1253
regardless of having passed "consensus" here. I.e., you can
1254
1254
use `fragments='chains'` to divide the topology for representation
1255
1255
and residue-tagging purposes but then define the interface as:
1256
- >>> frag_idxs_group_1 ="TM3"
1257
- >>> frag_idxs_group_2 ="TM2"
1256
+ >>> interface_selection_1 ="TM3"
1257
+ >>> interface_selection_2 ="TM2"
1258
1258
to compute the interface of TM3 vs TM2 in a GPCR. For
1259
1259
this mode of selection to work, the only condition is that the consensus
1260
1260
labels have been provided via `GPCR_Uniprot`,
1261
1261
`CGN_UniProt` or `KLIFS_string` (see below).
1262
- frag_idxs_group_1 : NoneType, default is None
1263
- Indices of the fragments that belong to the group_1.
1264
- Strings can be CSVs and include ranges, e.g. '1,3-4',
1265
- or be consensus labels "TM*,-TM6".
1266
- Defaults to None which will prompt the user of
1267
- information, except when only two fragments are
1268
- present. Then it defaults to [0]
1269
- frag_idxs_group_2 : NoneType, default is None
1270
- Indices of the fragments that belong to the group_2.
1271
- Strings can be CSVs and include ranges, e.g. '1,3-4',
1272
- or be consensus labels "TM*,-TM6".
1273
- Defaults to None which will prompt the user of
1274
- information, except when only two fragments are
1275
- present. Then it defaults to [1]
1262
+ interface_selection_1 : str or list, default is None
1263
+ Selection of the `fragments` that belong to one
1264
+ side of the interface. Strings can be CSVs
1265
+ and include:
1266
+ * ranges, e.g. '1,3-4'
1267
+ * wildcards, e.g. "TM*" or "G.H.??"
1268
+ * exclusions, e.g. "TM*,-TM6" (all TMs except TM6)
1269
+ The default is to prompt the user for
1270
+ information, except when:
1271
+ * `fragments` yielded only one fragment that
1272
+ **doesn't** cover the whole topology. Then
1273
+ all othe residues are put into a second
1274
+ fragment and then the interface is computed
1275
+ between these two fragments.
1276
+ * `fragments` yielded just two fragments. Then
1277
+ the interface is computed between these two fragments.
1278
+ interface_selection_2 : str or list, default is None
1279
+ Selection of the `fragments` that belong to the other
1280
+ side of the interface. Strings can be CSVs
1281
+ and include:
1282
+ * ranges, e.g. '1,3-4'
1283
+ * wildcards, e.g. "TM*" or "G.H.??"
1284
+ * exclusions, e.g. "TM*,-TM6" (all TMs except TM6)
1285
+ The default is to prompt the user for
1286
+ information, except when:
1287
+ * `fragments` yielded only one fragment that
1288
+ **doesn't** cover the whole topology. Then
1289
+ all othe residues are put into a second
1290
+ fragment and then the interface is computed
1291
+ between these two fragments.
1292
+ * `fragments` yielded just two fragments. Then
1293
+ the interface is computed between these two fragments.
1276
1294
AA_selection : str or list, default is None
1277
1295
Whatever the fragment definition and fragment selection
1278
1296
has been, one can further refine the list of
@@ -1515,14 +1533,14 @@ def interface(
1515
1533
fragments_as_residue_idxs , fragment_names , _ , consensus_labelers , consensus_maps , consensus_frags , top2confrag = _parse_fragdefs_fragnames_consensus (
1516
1534
refgeom .top , fragments , fragment_names , GPCR_UniProt , CGN_UniProt , KLIFS_string , accept_guess , save_nomenclature_files )
1517
1535
fragments_as_residue_idxs_d = {str (ii ) : val for ii , val in enumerate (fragments_as_residue_idxs )}
1518
- if len (fragments_as_residue_idxs )== 2 and frag_idxs_group_1 is None and frag_idxs_group_2 is None :
1519
- frag_idxs_group_1 , frag_idxs_group_2 = [0 ], [1 ]
1536
+ if len (fragments_as_residue_idxs )== 2 and interface_selection_1 is None and interface_selection_2 is None :
1537
+ interface_selection_1 , interface_selection_2 = [0 ], [1 ]
1520
1538
else :
1521
1539
fragments_as_residue_idxs_d .update (consensus_frags )
1522
1540
1523
1541
intf_frags_as_residxs , \
1524
1542
intf_frags_as_str_or_keys = _mdcfrg .frag_dict_2_frag_groups (fragments_as_residue_idxs_d , ng = 2 ,
1525
- answers = [frag_idxs_group_1 , frag_idxs_group_2 ],
1543
+ answers = [interface_selection_1 , interface_selection_2 ],
1526
1544
)
1527
1545
1528
1546
intersect = list (set (intf_frags_as_residxs [0 ]).intersection (intf_frags_as_residxs [1 ]))
0 commit comments