Skip to content

Commit

Permalink
feat: Add entry for descriptors, multiple mols #142
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohulan committed Jun 13, 2023
1 parent 4ea1379 commit 50f7df0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion app/routers/chem.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ async def SMILES_Descriptors(
return getCOCONUTDescriptors(smiles, toolkit)


@router.get("/descriptors/multiple")
async def SMILES_Descriptors_multiple(smiles: str, toolkit: Optional[str] = "rdkit"):
"""
Generate standard descriptors for the input molecules (SMILES):
- **SMILES**: required (query)
- **toolkit**: Optional (default:rdkit, allowed:cdk)
"""
if len(smiles.split(",")) > 1:
combinedDict = {
entry: getCOCONUTDescriptors(entry, toolkit) for entry in smiles.split(",")
}
return combinedDict
else:
return "Error invalid SMILES"


@router.get("/HOSEcode")
async def HOSE_Codes(
smiles: str,
Expand All @@ -100,7 +117,7 @@ async def HOSE_Codes(
- **SMILES**: required (query)
- **spheres**: required (query)
- **toolkit**: Optional (default:CDK)
- **toolkit**: Optional (default:cdk)
- **ringsize**: Optional (default:False)
"""
if smiles:
Expand Down

0 comments on commit 50f7df0

Please sign in to comment.