<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: devin2xing</title>
    <description>The latest articles on DEV Community by devin2xing (@_0a63a9baa4fb1573c27f8).</description>
    <link>https://dev.to/_0a63a9baa4fb1573c27f8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4240444%2Fc0c6859e-8d4e-4db6-86a5-42bf0cbf6bf5.png</url>
      <title>DEV Community: devin2xing</title>
      <link>https://dev.to/_0a63a9baa4fb1573c27f8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_0a63a9baa4fb1573c27f8"/>
    <language>en</language>
    <item>
      <title>FASTA vs FASTQ — Format Differences, Examples and Conversion</title>
      <dc:creator>devin2xing</dc:creator>
      <pubDate>Thu, 12 Nov 2026 08:04:01 +0000</pubDate>
      <link>https://dev.to/_0a63a9baa4fb1573c27f8/fasta-vs-fastq-format-differences-examples-and-conversion-2i7d</link>
      <guid>https://dev.to/_0a63a9baa4fb1573c27f8/fasta-vs-fastq-format-differences-examples-and-conversion-2i7d</guid>
      <description>&lt;p&gt;FASTA and FASTQ are the two workhorse text formats of bioinformatics. FASTA is older and simpler;&lt;br&gt;
FASTQ was introduced with next-generation sequencing to carry a per-base confidence score&lt;br&gt;
alongside each base.&lt;/p&gt;
&lt;h2&gt;
  
  
  FASTA
&lt;/h2&gt;

&lt;p&gt;A FASTA record is a header line beginning with &lt;code&gt;&amp;gt;&lt;/code&gt; followed by one or more lines of&lt;br&gt;
sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;seq1 sample description
ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG
&amp;gt;seq2
ATGGCCTTTGTAATGGGCCGCTGAAAGGGTGCCCGATAG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sequence lines are conventionally wrapped at 60 or 70 characters, but any width is legal. A file&lt;br&gt;
can hold any number of records.&lt;/p&gt;
&lt;h3&gt;
  
  
  What FASTA is used for
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Reference genomes and transcriptomes&lt;/li&gt;
&lt;li&gt;Protein sequences&lt;/li&gt;
&lt;li&gt;BLAST databases&lt;/li&gt;
&lt;li&gt;Multiple sequence alignment input&lt;/li&gt;
&lt;li&gt;Anywhere the sequence itself is the payload and per-base confidence is irrelevant&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  FASTQ
&lt;/h2&gt;

&lt;p&gt;A FASTQ record has four lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@read1
ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG
+
IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;@&lt;/code&gt; header — same content as a FASTA header, different marker&lt;/li&gt;
&lt;li&gt;Sequence&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;+&lt;/code&gt; separator, optionally repeating the header&lt;/li&gt;
&lt;li&gt;Quality string — exactly one character per base&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What the quality string means
&lt;/h2&gt;

&lt;p&gt;Each character encodes a Phred quality score Q, which is a log-scale estimate of the probability&lt;br&gt;
that the base is wrong:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Q = -10 × log10(P_error)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The character is the score plus an offset. Modern Illumina data uses Phred+33 (Sanger encoding),&lt;br&gt;
so:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Character&lt;/th&gt;
&lt;th&gt;ASCII&lt;/th&gt;
&lt;th&gt;Phred Q&lt;/th&gt;
&lt;th&gt;Error probability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;33&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1 in 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;+&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;43&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;1 in 10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;53&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;1 in 100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;?&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;63&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;1 in 1,000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;I&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;73&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;1 in 10,000&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Older Illumina pipelines used Phred+64, which produces characters like &lt;code&gt;h&lt;/code&gt; for a&lt;br&gt;
decent score. Mixing the two encodings silently corrupts quality interpretation — one of the&lt;br&gt;
reasons FASTQ files carry a "encoding" note in their metadata.&lt;/p&gt;

&lt;h2&gt;
  
  
  Converting FASTQ to FASTA
&lt;/h2&gt;

&lt;p&gt;This throws away the quality string. It is a one-line transformation per record, and it is&lt;br&gt;
completely safe — but it is also &lt;strong&gt;irreversible&lt;/strong&gt;. Once the quality data is gone it&lt;br&gt;
cannot be reconstructed.&lt;/p&gt;

&lt;p&gt;Convert when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your downstream tool only accepts FASTA (BLAST, most aligners' reference input)&lt;/li&gt;
&lt;li&gt;You are assembling or annotating and quality has already been used for filtering&lt;/li&gt;
&lt;li&gt;You need a compact archive of the sequences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do &lt;em&gt;not&lt;/em&gt; convert when you still need to trim, filter or call variants — those steps depend&lt;br&gt;
on the quality scores.&lt;/p&gt;

&lt;h2&gt;
  
  
  Converting FASTA to FASTQ
&lt;/h2&gt;

&lt;p&gt;Going the other way is synthesising information that never existed. You cannot invent real&lt;br&gt;
quality scores, so any converter has to write a placeholder. Ours writes the highest quality&lt;br&gt;
character throughout, which means "assume every base is correct".&lt;/p&gt;

&lt;p&gt;This is legitimate when an old tool insists on FASTQ input but you genuinely have no quality&lt;br&gt;
data — for example a sequence reconstructed from a paper. It is &lt;em&gt;not&lt;/em&gt; legitimate for&lt;br&gt;
feeding an aligner that will use those scores to decide which mismatches to trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick reference
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;FASTA&lt;/th&gt;
&lt;th&gt;FASTQ&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Header marker&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;@&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lines per record&lt;/td&gt;
&lt;td&gt;2+ (wrapped)&lt;/td&gt;
&lt;td&gt;exactly 4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quality scores&lt;/td&gt;
&lt;td&gt;no&lt;/td&gt;
&lt;td&gt;yes, one per base&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical size&lt;/td&gt;
&lt;td&gt;1× sequence&lt;/td&gt;
&lt;td&gt;~2× sequence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical source&lt;/td&gt;
&lt;td&gt;reference, protein&lt;/td&gt;
&lt;td&gt;sequencer output&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Convert in either direction with &lt;a href="https://seqandchem.com/bio/fasta-to-fastq" rel="noopener noreferrer"&gt;FASTA → FASTQ&lt;/a&gt; or&lt;br&gt;
&lt;a href="https://seqandchem.com/bio/fastq-to-fasta" rel="noopener noreferrer"&gt;FASTQ → FASTA&lt;/a&gt;, or compute GC content and sequence statistics&lt;br&gt;
with the &lt;a href="https://seqandchem.com/bio/gc-content" rel="noopener noreferrer"&gt;GC content calculator&lt;/a&gt;. All of them run locally in Python&lt;br&gt;
on this server — nothing is sent to a third party.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Convert in either direction with &lt;a href="https://seqandchem.com/bio/fasta-to-fastq" rel="noopener noreferrer"&gt;FASTA to FASTQ&lt;/a&gt; or &lt;a href="https://seqandchem.com/bio/fastq-to-fasta" rel="noopener noreferrer"&gt;FASTQ to FASTA&lt;/a&gt;, and get sequence statistics from the &lt;a href="https://seqandchem.com/bio/gc-content" rel="noopener noreferrer"&gt;GC content calculator&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bioinformatics</category>
      <category>genomics</category>
      <category>science</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Lipinski Rule of Five Explained — With Worked Examples</title>
      <dc:creator>devin2xing</dc:creator>
      <pubDate>Thu, 12 Nov 2026 07:58:01 +0000</pubDate>
      <link>https://dev.to/_0a63a9baa4fb1573c27f8/lipinski-rule-of-five-explained-with-worked-examples-50hc</link>
      <guid>https://dev.to/_0a63a9baa4fb1573c27f8/lipinski-rule-of-five-explained-with-worked-examples-50hc</guid>
      <description>&lt;p&gt;The rule of five was published by Christopher Lipinski and colleagues in 1997, based on an&lt;br&gt;
analysis of compounds that made it into clinical trials versus those that failed. It is a set of&lt;br&gt;
four thresholds, each involving the number five or a multiple of it — hence the name.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four rules
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Threshold&lt;/th&gt;
&lt;th&gt;What it reflects&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Molecular weight&lt;/td&gt;
&lt;td&gt;≤ 500 Da&lt;/td&gt;
&lt;td&gt;Size — large molecules diffuse poorly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;logP (octanol/water)&lt;/td&gt;
&lt;td&gt;≤ 5&lt;/td&gt;
&lt;td&gt;Lipophilicity — too greasy means poor solubility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hydrogen bond donors (HBD)&lt;/td&gt;
&lt;td&gt;≤ 5&lt;/td&gt;
&lt;td&gt;Count of N–H and O–H groups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hydrogen bond acceptors (HBA)&lt;/td&gt;
&lt;td&gt;≤ 10&lt;/td&gt;
&lt;td&gt;Count of N and O atoms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The usual interpretation is "no more than one violation". Two or more violations is where the&lt;br&gt;
probability of poor oral absorption rises sharply.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the numbers come from — and what they really mean
&lt;/h2&gt;

&lt;p&gt;The thresholds were not derived from first principles. They are the 90th percentile of the&lt;br&gt;
distribution for compounds that reached phase II trials. In other words: the rule describes the&lt;br&gt;
space that historically successful oral drugs occupied, not a physical law.&lt;/p&gt;

&lt;p&gt;That has two consequences worth remembering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Passing the rule does not make a compound a drug.&lt;/strong&gt; It makes it statistically
similar to ones that entered trials.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failing the rule does not make a compound useless.&lt;/strong&gt; Many antibiotics,
antifungals, PROTACs and natural products are far outside the space and work very well.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Worked example: aspirin
&lt;/h2&gt;

&lt;p&gt;SMILES: &lt;code&gt;CC(=O)Oc1ccccc1C(=O)O&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Pass?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MW&lt;/td&gt;
&lt;td&gt;180.16&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;logP&lt;/td&gt;
&lt;td&gt;1.19&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HBD&lt;/td&gt;
&lt;td&gt;1 (the carboxylic acid OH)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HBA&lt;/td&gt;
&lt;td&gt;4 (three O, one carbonyl O counted separately)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Aspirin passes on all four. Run the same input through the &lt;a href="https://seqandchem.com/lipinski" rel="noopener noreferrer"&gt;drug-likeness&lt;br&gt;
checker&lt;/a&gt; and you get the same table in one request.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Veber extensions
&lt;/h2&gt;

&lt;p&gt;Lipinski's rule says nothing about flexibility, which turns out to matter for oral&lt;br&gt;
bioavailability. Veber et al. (2002) added two criteria that are now usually reported alongside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rotatable bonds ≤ 10&lt;/strong&gt; — fewer conformations, better absorption&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Polar surface area (TPSA) ≤ 140 Å²&lt;/strong&gt; — beyond this, passive permeability drops&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A molecule can pass Lipinski and fail Veber — a long flexible chain with one polar group, for&lt;br&gt;
example. Reporting both gives a much more honest picture, which is why our&lt;br&gt;
&lt;a href="https://seqandchem.com/lipinski" rel="noopener noreferrer"&gt;checker&lt;/a&gt; shows all six numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Counting hydrogen bond acceptors wrong
&lt;/h3&gt;

&lt;p&gt;Lipinski's HBA count is the sum of nitrogen and oxygen atoms, not the number of lone pairs and&lt;br&gt;
not the number of acceptor &lt;em&gt;groups&lt;/em&gt;. A nitro group counts as three, a carboxylate as two.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using logP when you mean logD
&lt;/h3&gt;

&lt;p&gt;The rule uses logP — the partition coefficient of the neutral form. At physiological pH, an&lt;br&gt;
ionisable acid or base has a very different effective lipophilicity (logD). A carboxylic acid&lt;br&gt;
with logP 4.5 may have logD near 1 at pH 7.4. If you are reasoning about absorption, logD is&lt;br&gt;
usually the more relevant number.&lt;/p&gt;

&lt;h3&gt;
  
  
  Applying it to biologics
&lt;/h3&gt;

&lt;p&gt;The rule was derived from small molecules. Applying MW ≤ 500 to an antibody or a peptide is&lt;br&gt;
meaningless — those molecules are designed to work by entirely different mechanisms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use it as a filter, not a verdict
&lt;/h2&gt;

&lt;p&gt;The most useful application is triage: run a large library through the rule, flag compounds with&lt;br&gt;
two or more violations, and spend your synthesis budget elsewhere first. Keep the flag, not the&lt;br&gt;
decision. &lt;a href="https://seqandchem.com/lipinski" rel="noopener noreferrer"&gt;Run the checker&lt;/a&gt; on any SMILES string, or paste a whole library&lt;br&gt;
into the &lt;a href="https://seqandchem.com/batch" rel="noopener noreferrer"&gt;batch converter&lt;/a&gt; to compute properties in bulk.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Run the rule on any SMILES string with the free &lt;a href="https://seqandchem.com/lipinski" rel="noopener noreferrer"&gt;drug-likeness checker&lt;/a&gt;, or paste a whole library into the &lt;a href="https://seqandchem.com/batch" rel="noopener noreferrer"&gt;batch converter&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>chemistry</category>
      <category>science</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>SMILES vs InChI vs InChIKey — Differences Explained (2026)</title>
      <dc:creator>devin2xing</dc:creator>
      <pubDate>Thu, 12 Nov 2026 07:58:00 +0000</pubDate>
      <link>https://dev.to/_0a63a9baa4fb1573c27f8/smiles-vs-inchi-vs-inchikey-differences-explained-2026-28an</link>
      <guid>https://dev.to/_0a63a9baa4fb1573c27f8/smiles-vs-inchi-vs-inchikey-differences-explained-2026-28an</guid>
      <description>&lt;p&gt;If you have ever tried to match compounds across two databases and found that the same molecule&lt;br&gt;
appears twice, the culprit is usually the representation format. SMILES, InChI and InChIKey all&lt;br&gt;
describe a structure, but they differ in what they guarantee — and only one of them is safe as a&lt;br&gt;
primary key.&lt;/p&gt;
&lt;h2&gt;
  
  
  SMILES: compact, human-writable, not canonical
&lt;/h2&gt;

&lt;p&gt;SMILES (Simplified Molecular Input Line Entry System) writes a molecule as a traversal of its&lt;br&gt;
graph. Atoms are element symbols, bonds are implicit or written as &lt;code&gt;-&lt;/code&gt;, &lt;code&gt;=&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;#&lt;/code&gt;, branches use parentheses and rings use digit closures.&lt;/p&gt;

&lt;p&gt;Aspirin, for example, can be written as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CC(=O)Oc1ccccc1C(=O)O
OC(=O)c1ccccc1OC(C)=O
O=C(O)c1ccccc1OC(=O)C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All three are valid and describe the same molecule. That flexibility is exactly the problem: a&lt;br&gt;
string comparison of two SMILES is &lt;em&gt;not&lt;/em&gt; a comparison of two molecules.&lt;/p&gt;
&lt;h3&gt;
  
  
  What SMILES is good for
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Pasting into a structure editor or drawing tool&lt;/li&gt;
&lt;li&gt;Compact storage inside a script or a database column you control&lt;/li&gt;
&lt;li&gt;SMARTS substructure queries (SMARTS is SMILES extended with wildcards)&lt;/li&gt;
&lt;li&gt;Input to almost every cheminformatics toolkit&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  What SMILES is bad for
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Deduplication — unless you canonicalise first&lt;/li&gt;
&lt;li&gt;Cross-database lookup — different toolkits canonicalise differently&lt;/li&gt;
&lt;li&gt;Regulatory or archival identifiers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most toolkits do have a canonical SMILES algorithm, but "canonical" is toolkit-specific. RDKit's&lt;br&gt;
canonical SMILES and OpenBabel's canonical SMILES are both deterministic and both perfectly&lt;br&gt;
valid — and they are not guaranteed to produce the same string. That makes canonical SMILES a&lt;br&gt;
good internal key and a poor external one.&lt;/p&gt;
&lt;h2&gt;
  
  
  InChI: canonical by standard
&lt;/h2&gt;

&lt;p&gt;InChI (International Chemical Identifier) is maintained by IUPAC and designed specifically to be&lt;br&gt;
a canonical, non-proprietary identifier. Every conforming implementation must produce the same&lt;br&gt;
string for the same structure. The format is layered:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;1S&lt;/code&gt; — version 1, standard InChI&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;C9H8O4&lt;/code&gt; — molecular formula layer&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;c1-6(10)13-...&lt;/code&gt; — connectivity layer&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;h2-5H,1H3,(H,11,12)&lt;/code&gt; — hydrogen layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Separate layers also cover charge, stereochemistry (including &lt;code&gt;/t&lt;/code&gt; and &lt;code&gt;/m&lt;/code&gt;&lt;br&gt;
sub-layers) and isotopes. If a structure has no stereo, those layers are simply absent.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why InChI exists
&lt;/h3&gt;

&lt;p&gt;Before InChI, every vendor had its own canonical form. InChI gave the community a single&lt;br&gt;
reference string that could be published in a paper or deposited with a patent and re-derived&lt;br&gt;
later by anyone. PubChem, ChEMBL, Wikidata and most patent databases index by InChI and&lt;br&gt;
InChIKey.&lt;/p&gt;
&lt;h3&gt;
  
  
  The downside: length
&lt;/h3&gt;

&lt;p&gt;A full InChI is long, contains punctuation that needs escaping in URLs, and grows with molecule&lt;br&gt;
complexity. For a small molecule it is ~60 characters; for a peptide or a natural product it can&lt;br&gt;
be hundreds. Indexing millions of them is possible but not free.&lt;/p&gt;
&lt;h2&gt;
  
  
  InChIKey: fixed-width hash
&lt;/h2&gt;

&lt;p&gt;The InChIKey is a hash of the InChI, always exactly 27 characters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BSYNRYMUTXBXSQ-UHFFFAOYSA-N
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The three blocks are meaningful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;First 14&lt;/strong&gt; — the molecular skeleton (connectivity plus formula)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next 8&lt;/strong&gt; — stereochemistry, charge and isotope layers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Final 1&lt;/strong&gt; — a check character to catch transcription errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because the first block ignores stereo, two enantiomers share the same 14-character prefix and&lt;br&gt;
differ only in the second block. That is convenient for "find me anything with this skeleton"&lt;br&gt;
queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  What InChIKey cannot do
&lt;/h3&gt;

&lt;p&gt;It is a one-way hash. You cannot recover a structure from a key, and you cannot convert a key&lt;br&gt;
into anything else. Keep the InChI or the original structure file alongside it. Also note that&lt;br&gt;
the key is case-sensitive — &lt;code&gt;BSYNRYMUTXBXSQ-UHFFFAOYSA-N&lt;/code&gt; and its lowercase form are&lt;br&gt;
different strings to a database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which one should you use?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pasting into a drawing tool&lt;/td&gt;
&lt;td&gt;SMILES&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deduplicating a library&lt;/td&gt;
&lt;td&gt;InChI (or InChIKey)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Primary key in a database&lt;/td&gt;
&lt;td&gt;InChIKey, with InChI stored alongside&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Matching against PubChem / ChEMBL&lt;/td&gt;
&lt;td&gt;InChIKey&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SMARTS substructure search&lt;/td&gt;
&lt;td&gt;SMILES / SMARTS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filing a patent or a regulatory dossier&lt;/td&gt;
&lt;td&gt;InChI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Converting between them
&lt;/h2&gt;

&lt;p&gt;All three conversions are one click on this site: &lt;a href="https://seqandchem.com/smiles-to-inchi" rel="noopener noreferrer"&gt;SMILES to InChI&lt;/a&gt;,&lt;br&gt;
&lt;a href="https://seqandchem.com/inchi-to-smiles" rel="noopener noreferrer"&gt;InChI to SMILES&lt;/a&gt;, &lt;a href="https://seqandchem.com/smiles-to-inchikey" rel="noopener noreferrer"&gt;SMILES to&lt;br&gt;
InChIKey&lt;/a&gt; and &lt;a href="https://seqandchem.com/inchi-to-inchikey" rel="noopener noreferrer"&gt;InChI to InChIKey&lt;/a&gt;. Two rules of thumb:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always convert &lt;em&gt;toward&lt;/em&gt; InChI when you cross a system boundary, never away from it.&lt;/li&gt;
&lt;li&gt;Never rely on a SMILES string being stable across tools; canonicalise at the point of entry.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;SeqChem has free browser tools for all of this: &lt;a href="https://seqandchem.com/smiles-to-inchi" rel="noopener noreferrer"&gt;SMILES to InChI&lt;/a&gt;, &lt;a href="https://seqandchem.com/inchi-to-smiles" rel="noopener noreferrer"&gt;InChI to SMILES&lt;/a&gt; and &lt;a href="https://seqandchem.com/smiles-to-inchikey" rel="noopener noreferrer"&gt;SMILES to InChIKey&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>chemistry</category>
      <category>cheminformatics</category>
      <category>opensource</category>
      <category>science</category>
    </item>
  </channel>
</rss>
