Skip to content

Add Mordred Aromatic descriptors#568

Open
pkacprzak5 wants to merge 1 commit intopk-mordred-adjacency-matrixfrom
pk-mordred-aromatic
Open

Add Mordred Aromatic descriptors#568
pkacprzak5 wants to merge 1 commit intopk-mordred-adjacency-matrixfrom
pk-mordred-aromatic

Conversation

@pkacprzak5
Copy link
Copy Markdown
Collaborator

Stack created with GitHub Stacks CLIGive Feedback 💬

"""
Compute Mordred aromatic atom and bond count descriptors.
"""
return cache.aromatic_values.copy(), FEATURE_NAMES
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List features explicitly

def _aromatic_values(mol: Mol) -> np.ndarray:
return np.asarray(
[
sum(1 for atom in mol.GetAtoms() if atom.GetIsAromatic()),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just sum atom.GetIsAromatic()?

return np.asarray(
[
sum(1 for atom in mol.GetAtoms() if atom.GetIsAromatic()),
sum(1 for bond in mol.GetBonds() if bond.GetIsAromatic()),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants