def MMFFctab23D(ctab, multi=False): """ Generate 3D coordinates from molfile using Merck Molecular Force Field. CTAB is urlsafe_base64 encoded string containing single molfile or concatenation of multiple molfiles. """ data = base64.urlsafe_b64decode(ctab) return _ctab23D(data, int(multi), True)
def MMFFctab23D(): """ Generate 3D coordinates from molfile using Merck Molecular Force Field. CTAB is either single molfile or SDF file. """ multi = int(request.forms.get('multi', False)) data = request.files.values()[0].file.read() if len(request.files) else request.body.read() return _ctab23D(data, multi, True)
def ctab23DView(data, params): kwargs = dict() kwargs['multi'] = int(params.get('multi', False)) kwargs['sanitize'] = _parseFlag(params.get('sanitize', True)) kwargs['removeHs'] = _parseFlag(params.get('removeHs', True)) kwargs['strictParsing'] = _parseFlag(params.get('strictParsing', True)) kwargs['mmff'] = _parseFlag(params.get('mmff', False)) return _ctab23D(data, **kwargs)