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

bookChallenge: Parse SMILES Strings

Завдання

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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Parse SMILES Strings

Свайпніть щоб показати меню

Завдання

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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 2
single

single

some-alt