Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Parse SMILES Strings | Molecular Representations and Parsing
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Chemoinformatics

bookChallenge: Parse SMILES Strings

Taak

Swipe to start coding

Write a function that takes a single SMILES string and returns the number of atoms in that molecule. SMILES (Simplified Molecular Input Line Entry System) strings are text representations of molecules, where each atom is represented by its atomic symbol (like C for carbon, O for oxygen, Cl for chlorine, etc.). For this task, count only the atoms represented by their symbols, ignoring ring closures, bond symbols, and parentheses.

  • Accept a single SMILES string as input.
  • Count the number of atomic symbols present, including both single-letter and common two-letter symbols.
  • Ignore digits, bond symbols (-, =, #, :, (, ), /, \) and any other non-atom characters.
  • Return the total atom count for the molecule.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookChallenge: Parse SMILES Strings

Veeg om het menu te tonen

Taak

Swipe to start coding

Write a function that takes a single SMILES string and returns the number of atoms in that molecule. SMILES (Simplified Molecular Input Line Entry System) strings are text representations of molecules, where each atom is represented by its atomic symbol (like C for carbon, O for oxygen, Cl for chlorine, etc.). For this task, count only the atoms represented by their symbols, ignoring ring closures, bond symbols, and parentheses.

  • Accept a single SMILES string as input.
  • Count the number of atomic symbols present, including both single-letter and common two-letter symbols.
  • Ignore digits, bond symbols (-, =, #, :, (, ), /, \) and any other non-atom characters.
  • Return the total atom count for the molecule.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 2
single

single

some-alt