Challenge: 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.
Solução
Obrigado pelo seu feedback!
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Incrível!
Completion taxa melhorada para 6.25
Challenge: Parse SMILES Strings
Deslize para mostrar o menu
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.
Solução
Obrigado pelo seu feedback!
single