{"id":21053238,"url":"https://github.com/sqrtneginf/smarts","last_synced_at":"2026-01-02T01:25:07.323Z","repository":{"id":107338715,"uuid":"138041752","full_name":"SqrtNegInf/SMARTS","owner":"SqrtNegInf","description":"SMARTS: 'regular expressions' for chemical structures","archived":false,"fork":false,"pushed_at":"2018-06-21T19:50:26.000Z","size":70,"stargazers_count":18,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T18:44:52.403Z","etag":null,"topics":["cheminformatics"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SqrtNegInf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-20T14:10:37.000Z","updated_at":"2024-05-13T04:40:13.000Z","dependencies_parsed_at":"2023-05-17T03:00:22.194Z","dependency_job_id":null,"html_url":"https://github.com/SqrtNegInf/SMARTS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FSMARTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FSMARTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FSMARTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SqrtNegInf%2FSMARTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SqrtNegInf","download_url":"https://codeload.github.com/SqrtNegInf/SMARTS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243497395,"owners_count":20300241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheminformatics"],"created_at":"2024-11-19T16:05:14.611Z","updated_at":"2026-01-02T01:25:07.250Z","avatar_url":"https://github.com/SqrtNegInf.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SMARTS is like a regular expression for chemical compounds\n\nSMARTS is a tool for structure searching, the process of finding a particular pattern\n(a *subgraph*) in a molecule (a *graph*). Structural searches are\nused in virtually every computer-based chemistry application.\n\nInitially inspired by UNIX implementation of regular expressions, \nSMARTS evolved into somethings that can be viewed as a \ndomain-specific grammar for chemical compounds, combining \nthe functions of traversing a graph and matching a pattern.\nAn overview of the syntax can be in the [SMARTS summary](./cheat-sheet.txt)\n\n### Defining terms, an example\n\n* SMILES = __S__ implified __M__ olecular __I__ nput __L__ ine __E__ diting __S__ pecification\n* SMARTS = __SM__ ILES __Ar__ bitrary __T__ arget __S__ pecification\n\nA SMILES defines a specific chemical compound, here the pesticide DDT:  \n\n*  Clc1ccc(cc1)C(c2ccc(Cl)cc2)C(Cl)(Cl)Cl\n\nA SMARTS is an expression that looks for a match of a particular arrangement \nof atoms/bonds in that compound, here di-aryl ethane with any 3 halogens \n(bromine, chlorine, flourine):\n\n* C(c)(c)C([Br,Cl,F])([Br,Cl,F])([Br,Cl,F])\n\nThis matches DDT, but also three other compounds:\n\n* 2,2-DIPHENYL-1,1,1-TRICHLOROETHANE\n* 1,1,1-TRIFLUORO-2,2-DI(P-METHOXYPHENYL)ETHANE\n* METHOXYCHLOR\n\nHere's an image of the [DDT search results](./ddt.png)\n\n### Scaffold dictionary\n\nPrecisely targeted structural searches are often non-trivial, so it makes sense\nto develop a standard library for re-use. Here is a compendium of nearly \n[700 SMARTS targets](./scaffold-dictionary.txt).\n\n### Scaffold screens\n\nAnother good example of the utility of SMARTS is shown by the scaffold screening Fortran code in\n[screen.for](./screen.for)\n\nThe scaffold screens consist of a mixture of custom code and SMARTS targets. The trade-off\nis that while SMARTS targets are relatively easy to write, they are slow at runtime. Custom\ncode is generally 10x or more faster, but significantly harder to write and maintain.\n\nTo reduce the runtime penalty for SMARTS, a quick analysis is done for the input compound,\ntallying atoms, bonds, rings (sizes and counts), basic structural features, etc.  This is\nused to avoid running a lengthy SMARTS search when it cannot possibly succeed (say the target\ncontains two nitrogens, but the compound has only one).\n\nA good comparison between the two approaches can be seen in the current SMARTS-based\n'phenothiazine' code (around line 500) and the previously-used custom code, left commented\njust after.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqrtneginf%2Fsmarts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqrtneginf%2Fsmarts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqrtneginf%2Fsmarts/lists"}