Skip to content

Commit 181742c

Browse files
authored
added docstring to merge_fragment_a_to_cutting_label_on_b
1 parent 869f5ed commit 181742c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

rmgpy/molecule/fragment_utils.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,18 @@ def check_if_pibond_near_cutting_label(species_smiles):
358358
return False
359359

360360
def merge_fragment_a_to_cutting_label_on_b(smiles_a, smiles_b, cuttinglabel):
361+
"""
362+
This function takes two SMILES strings representing molecular fragments and merges them at the specified
363+
cutting label on the fragment represented by smiles_b
364+
365+
Parameters:
366+
smiles_a (str): The SMILES string of the first molecular fragment.
367+
smiles_b (str): The SMILES string of the second molecular fragment.
368+
cuttinglabel (CuttingLabel): The label indicating where the first fragment should be merged to the second.
369+
370+
Returns:
371+
Fragment: A new fragment object obtained by merging the two input fragments at the specified cutting label.
372+
"""
361373
a_frag = Fragment().from_smiles_like_string(smiles_a)
362374
b_frag = Fragment().from_smiles_like_string(smiles_b)
363375
for vertex in b_frag.vertices:

0 commit comments

Comments
 (0)