parameters: (mol, tform, confId=-1, newConfId=100)
docstring: Applies the transformation to a molecule and sets it up with a single conformer
docstring_summary: Applies the transformation to a molecule and sets it up with a single conformer
docstring_tokens: Applies the transformation to a molecule and sets it up with a single conformer
function: def TransformMol(mol, tform, confId=-1, newConfId=100):
    """  Applies the transformation to a molecule and sets it up with a single conformer """
    newConf = Chem.Conformer()
    newConf.SetId(0)
    refConf = mol.GetConformer(confId)
    for i in range(refConf.GetNumAtoms()):
      pos = list(refConf.GetAtomPosition(i))
      pos.append(1.0)
      newPos = numpy.dot(tform, numpy.array(pos))
      newConf.SetAtomPosition(i, list(newPos)[:3])
    newConf.SetId(newConfId)
    mol.RemoveConformer(newConfId)
    mol.AddConformer(newConf, assignId=False)
function_tokens: def TransformMol ( mol , tform , confId = - 1 , newConfId = 100 ) : newConf = Chem . Conformer ( ) newConf . SetId ( 0 ) refConf = mol . GetConformer ( confId ) for i in range ( refConf . GetNumAtoms ( ) ) : pos = list ( refConf . GetAtomPosition ( i ) ) pos . append ( 1.0 ) newPos = numpy . dot ( tform , numpy . array ( pos ) ) newConf . SetAtomPosition ( i , list ( newPos ) [ : 3 ] ) newConf . SetId ( newConfId ) mol . RemoveConformer ( newConfId ) mol . AddConformer ( newConf , assignId = False )