Print

Print


Gary Thompson wrote:
> Rasmus Fogh wrote:
>> Dear Gary,
>>
>> Isotope Codes are strings, like '13C', '1H', etc. Isotopes are objects,
>> living in the molecule...
> Hi Rasmus
>
> many thanks that makes everything clear ;-)
>
> regards
> gary
nb so this is what I cam up with for getIsotope:

# todo add a default chemElementStore key e.g. ccpn?
def getIsotope(project,symbol,massNumber):
    result = None

    chem_element =  None

    chem_element = 
project.chemElementStores[0].findFirstChemElement(symbol=symbol)
    if chem_element:
        result = chem_element.findFirstIsotope(massNumber = massNumber)

    return result

is this the best way to do it?

regards
gary

-- 
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: [log in to unmask]                   Fax  +44-113-2331407
-------------------------------------------------------------------