def __init__(self, name, ranges=None, root='.', **kwds): NTtree.__init__(self, __CLASS__='Projects', name=name, ranges=ranges, root=root, **kwds) self.entries = self._children self.next_id = 0 self.moleculeMap = None self.rmsds = None # pairwise rmsd comparisons self.mkdir()
def __init__(self, name, *args, **kwds): NTtree.__init__( self, __CLASS__="MolDef", convention=constants.INTERNAL, name=name, residueDict={}, # contains definitions of residues, sorted by convention ) self.residues = self._children for arg in args: self.update(arg) # end for self.update(kwds) self.__FORMAT__ = "=== MolDef %(name)s (%(convention)r) ===\n" + "residues: %(residues)s\n"
def __init__(self, name, **kwds): NTtree.__init__( self, __CLASS__="DihedralDef", convention=constants.INTERNAL, name=name, aliases=[], residueDef=None, atoms=[], # List of atoms: (i, name) tuple # i: -1=previous residue # 0=current residue # 1=next residue karplus=None, # Karplus parameters: (A,B,C,teta) tuple ) self.update(kwds) self.__FORMAT__ = ( "=== DihedralDef %(residueDef)s.%(name)s (%(convention)r) ===\n" + "atoms: %(atoms)s\n" + "karplus: %(karplus)s" )
def __init__(self, name, **kwds): NTtree.__init__( self, __CLASS__="ResidueDef", convention=constants.INTERNAL, name=name, # used to refer to this residueDef: should be unique commonName=name, # used to name residue; default later changed to constants.IUPAC if exists shortName="_", canBeModified=True, # ResidueDef can be modified; i.e. AtomDefs added; # set to False on import for non-protein and non-nucleic CING definitions shouldBeSaved=True, # ResidueDef requires saving with project; set to False on import for default CING definitions comment=None, nameDict={constants.INTERNAL_0: name, constants.INTERNAL_1: name}, atomDict={}, # contains definition of atoms, sorted by convention, dynamically created on initialization dihedrals=NTlist(), properties=[], # list of properties for residue ) if self.nameDict.has_key(constants.IUPAC): self.commonName = self.nameDict[constants.IUPAC] # update the defaults with any arguments to the initialization self.update(kwds) self.properties = [] # NB atoms is a derived attribute (from _children), no need to save it explicitly self.atoms = self._children self.__FORMAT__ = ( "=== ResidueDef %(name)s (%(convention)r) ===\n" + "commonName: %(commonName)s\n" + "shortName: %(shortName)s\n" + "comment: %(comment)s\n" + "atoms: %(atoms)s\n" + "dihedrals: %(dihedrals)s\n" + "properties: %(properties)s" )
def __init__(self, name, **kwds): # print '>>', args, kwds NTtree.__init__( self, __CLASS__="AtomDef", convention=constants.INTERNAL, name=name, # Internal name nameDict={constants.INTERNAL_0: name, constants.INTERNAL_1: name}, # default initialization, to be # updated later. aliases=[], # list of aliases, canBeModified=True, residueDef=None, # ResidueDef instance topology=[], # List of bound atoms: (i, name) tuple # i: -1=previous residue; 0=current residue; 1=next residue NterminalTopology=[], # special case for N-terminal atoms CterminalTopology=[], # special case for C-terminal atoms pseudo=None, # Corresponding pseudo atom (for real atoms) pseudoId=DEFAULT_PSEUDO_ATOM_ID_UNDEFINED, real=[], # List of corresponding real atoms (for pseudo atoms) type=None, # Cyana type of atom spinType=None, # NMR spin type; i.e. 1H, 13C ... shift=None, # NTdict with average and sd hetatm=False, # PDB HETATM type ) self.properties = [] # List with properties self.update(kwds) self.__FORMAT__ = ( "=== %(name)s (%(convention)r) ===\n" + "topology: %(topology)s\n" + "pseudo: %(pseudo)s\n" + "real: %(real)s\n" + "spinType: %(spinType)s\n" + "hetatm: %(hetatm)s\n" + "properties: %(properties)s" )