orthonym.rules.salts#
Note
Internal API. Names and behaviour may change between releases.
Salt and zwitterion naming rules per IUPAC 2013.
Handles naming of: - Salts: Compositional nomenclature (cation + anion as separate words) - Zwitterions: Internal ion pairs with combined suffixes
IUPAC 2013 References: -: Anion nomenclature -: Cation nomenclature -: Zwitterion nomenclature
Key naming patterns: - Salts: “cation anion” format (sodium acetate, ammonium chloride) - Zwitterions: base name with ionic suffixes (2-azaniumylacetate) - Multiple ions: alphabetized cations before alphabetized anions - Stoichiometry: multiplicative prefixes for repeated ions (diacetate)
- orthonym.rules.salts.name_salt(mol, style='pin', *, general_fallback=False, general_fallback_unverified=False, allow_aromatic_general=False)#
Name a salt using compositional nomenclature.
Format: cation_name + space + anion_name Example: “sodium acetate”, “ammonium chloride”
Also handles: - Neutral organic fragments with inorganic counter-ions (Drug.HCl pattern) - H+ fragments merged with anions for hydroacid salt naming - Partial salts with “hydrogen” prefix (sodium hydrogen fumarate)
For multiple cations/anions, order alphabetically. For stoichiometry > 1, use multiplier prefixes.
- Parameters:
mol – RDKit Mol object (contains disconnected fragments)
style (str) – ‘pin’ for preferred names
- Returns:
Salt name as “cation anion” (separate words)
- Return type:
str
Example
>>> mol = Chem.MolFromSmiles('[Na+].[O-]C(C)=O') >>> name_salt(mol) 'sodium acetate'
- orthonym.rules.salts.name_zwitterion(mol, style='pin')#
Name a zwitterionic compound.
IUPAC rules: - Anionic centers get lower locants (higher seniority) - Cationic suffixes cited BEFORE anionic suffixes - Format: base-name-cation_suffix-anion_suffix
Common zwitterions: - Amino acid zwitterions: glycine = 2-ammonioacetate (PIN) or glycine (trivial)
- Parameters:
mol – RDKit Mol object with internal positive and negative charges
style (str) – ‘pin’ for preferred names
- Returns:
Zwitterion IUPAC name
- Return type:
str
Example
>>> mol = Chem.MolFromSmiles('C[N+](C)(C)CC(=O)[O-]') >>> name_zwitterion(mol) '(trimethylazaniumyl)acetate'
- orthonym.rules.salts.is_salt(mol)#
Check if a molecule is a salt (has separate cation and anion fragments).
- Parameters:
mol – RDKit Mol object
- Returns:
True if molecule is a salt
- Return type:
bool
Example
>>> mol = Chem.MolFromSmiles('[Na+].[Cl-]') >>> is_salt(mol) True
- orthonym.rules.salts.is_zwitterion(mol)#
Check if a molecule is a zwitterion (internal + and - charges).
- Parameters:
mol – RDKit Mol object
- Returns:
True if molecule is a zwitterion
- Return type:
bool
Example
>>> mol = Chem.MolFromSmiles('[NH3+]CC([O-])=O') >>> is_zwitterion(mol) True