﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
690	Custom atom/residue properties?	Tristan Croll	Eric Pettersen	"There are various situations where one might want to associate custom per-atom and/or per-residue values with a model. Conservation analysis, for example - or in my case, per-atom scaling factors to allow fine-grained tuning of the coupling between atoms and maps during an ISOLDE simulation. Superficially straightforward, but gets a little more complicated when one considers structure editing (i.e. addition/removal of atoms/residues). I wonder if it would be possible to implement something along the lines of the following at the Structure/AtomicStructure level?


{{{
def add_custom_atom_property(self, name, data_type, default_value):
    '''
    Adds a new array of custom properties to the atoms in this model.
    Args:
        name:
            a key for later retrieval of this property
        data_type:
            the data type of the property values (e.g. float, int, object)
        default_value:
            the default value associated with each atom
    '''

def get_custom_property_values(self, name, atoms):
    '''
    Returns a numpy array of values for the given custom property 
    associated with the given atoms. Raises an error if any atoms are not
    in this model.
    '''

def set_custom_property_values(self, name, atoms, values):
    '''
    Sets the values of the named custom property for the given atoms.
    '''

def _update_custom_properties_on_model_changes(self):
    '''
    Updates all existing custom properties (removing obsolete values for
    deleted atoms, adding default values for new atoms, and re-indexing)
    when self.new_atoms() is run.
    '''     
}}}
"	enhancement	closed	major		Structure Editing		fixed						all	ChimeraX
