How to use the pdb2pqr.pdb2pqr.definitions.DefinitionAtom function in pdb2pqr

To help you get started, we’ve selected a few pdb2pqr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens / __init__.py View on Github external
myconf.add_atom(atom2)
                        mydef.add_conf(myconf)

        elif name in ['WAT']:
            pass

        else:
            for atom in atoms:
                hname = atom
                x = atommap[name, hname].x
                y = atommap[name, hname].y
                z = atommap[name, hname].z
                bondatom = atommap[name, hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = defns.DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                if refatoms != None:
                    if name == 'HIS' and atom.name == 'HE2':
                        refatoms = ['NE2', 'CE1', 'CD2']
                    if name == 'ARG' and atom.name == 'HE':
                        refatoms = ['NE', 'CZ', 'NH1']
                    for atom in refatoms:
                        atomname = atom
                        x = atommap[name, atomname].x
                        y = atommap[name, atomname].y
                        z = atommap[name, atomname].z
                        atom = defns.DefinitionAtom(atomname, x, y, z)
                        myconf.add_atom(atom)
                    mydef.add_conf(myconf)
        return mydef
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens / __init__.py View on Github external
if name in ['NTR']:
            for atom in atoms:
                hname = atom
                x = ntrmap[hname].x
                y = ntrmap[hname].y
                z = ntrmap[hname].z
                bondatom = ntrmap[hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = defns.DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                # TODO - lots of arbitrary undefined numbers in this section
                for atom_ in refatoms:
                    if atom_ == 'N':
                        natom = defns.DefinitionAtom(atom_, 1.201, 0.847, 0.0)
                        myconf.add_atom(natom)
                    elif atom_ == 'CA':
                        caatom = defns.DefinitionAtom(atom_, 0.0, 0.0, 0.0)
                        myconf.add_atom(caatom)
                    elif atom_ == 'H':
                        caatom = defns.DefinitionAtom(atom_, 1.201, 1.847, 0.000)
                        myconf.add_atom(caatom)
                    else: pass
                mydef.add_conf(myconf)

        elif name in ['CTR']:
            for conformer in conformernames:
                for atom in atoms:
                    hname = atom
                    x = hmap[conformer, hname].x
                    y = hmap[conformer, hname].y
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens.py View on Github external
else:
            patchmap = self.routines.protein.patchmap[name]
            atoms = list(patchmap.map.keys())
            atoms.sort()

        if name in ['NTR']:
            for atom in atoms:
                hname = atom
                x = ntrmap[hname].x
                y = ntrmap[hname].y
                z = ntrmap[hname].z
                bondatom = ntrmap[hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                # TODO - lots of arbitrary undefined numbers in this section
                for atom_ in refatoms:
                    if atom_ == 'N':
                        natom = DefinitionAtom(atom_, 1.201, 0.847, 0.0)
                        myconf.add_atom(natom)
                    elif atom_ == 'CA':
                        caatom = DefinitionAtom(atom_, 0.0, 0.0, 0.0)
                        myconf.add_atom(caatom)
                    elif atom_ == 'H':
                        caatom = DefinitionAtom(atom_, 1.201, 1.847, 0.000)
                        myconf.add_atom(caatom)
                    else: pass
                mydef.add_conf(myconf)
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens.py View on Github external
bondatom = ntrmap[hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                # TODO - lots of arbitrary undefined numbers in this section
                for atom_ in refatoms:
                    if atom_ == 'N':
                        natom = DefinitionAtom(atom_, 1.201, 0.847, 0.0)
                        myconf.add_atom(natom)
                    elif atom_ == 'CA':
                        caatom = DefinitionAtom(atom_, 0.0, 0.0, 0.0)
                        myconf.add_atom(caatom)
                    elif atom_ == 'H':
                        caatom = DefinitionAtom(atom_, 1.201, 1.847, 0.000)
                        myconf.add_atom(caatom)
                    else: pass
                mydef.add_conf(myconf)

        elif name in ['CTR']:
            for conformer in conformernames:
                for atom in atoms:
                    hname = atom
                    x = hmap[conformer, hname].x
                    y = hmap[conformer, hname].y
                    z = hmap[conformer, hname].z
                    bondatom = hmap[conformer, hname].bonds[0]
                    bondlength = 1.0
                    myconf = HydrogenConformation(hname, bondatom, bondlength)
                    atom = DefinitionAtom(hname, x, y, z)
                    myconf.add_atom(atom)
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens / structures.py View on Github external
def endElement(self, name):
        """Complete whatever object is currently passed in by the name
        parameter
        """
        if name == "class": # Complete Residue object
            obj = self.curholder
            if not isinstance(obj, optimize.OptimizationHolder):
                raise ValueError("Internal error parsing XML!")

            self.map[obj.name] = obj
            self.curholder = None
            self.curobj = None

        elif name == "atom": # Complete atom object
            atom = self.curatom
            if not isinstance(atom, defns.DefinitionAtom):
                raise ValueError("Internal error parsing XML!")

            atomname = atom.name
            if atomname == "":
                raise ValueError("Atom name not set in XML!")
            else:
                self.curholder.map[atomname] = atom
                self.curatom = None
                self.curobj = self.curholder

        else: # Just free the current element namespace
            self.curelement = ""

        return self.map
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens / __init__.py View on Github external
bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = defns.DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                if refatoms != None:
                    if name == 'HIS' and atom.name == 'HE2':
                        refatoms = ['NE2', 'CE1', 'CD2']
                    if name == 'ARG' and atom.name == 'HE':
                        refatoms = ['NE', 'CZ', 'NH1']
                    for atom in refatoms:
                        atomname = atom
                        x = atommap[name, atomname].x
                        y = atommap[name, atomname].y
                        z = atommap[name, atomname].z
                        atom = defns.DefinitionAtom(atomname, x, y, z)
                        myconf.add_atom(atom)
                    mydef.add_conf(myconf)
        return mydef
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens / __init__.py View on Github external
else:
            patch_map = self.debumper.protein.patch_map[name]
            atoms = list(patch_map.map.keys())
            atoms.sort()

        if name in ['NTR']:
            for atom in atoms:
                hname = atom
                x = ntrmap[hname].x
                y = ntrmap[hname].y
                z = ntrmap[hname].z
                bondatom = ntrmap[hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = defns.DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                # TODO - lots of arbitrary undefined numbers in this section
                for atom_ in refatoms:
                    if atom_ == 'N':
                        natom = defns.DefinitionAtom(atom_, 1.201, 0.847, 0.0)
                        myconf.add_atom(natom)
                    elif atom_ == 'CA':
                        caatom = defns.DefinitionAtom(atom_, 0.0, 0.0, 0.0)
                        myconf.add_atom(caatom)
                    elif atom_ == 'H':
                        caatom = defns.DefinitionAtom(atom_, 1.201, 1.847, 0.000)
                        myconf.add_atom(caatom)
                    else: pass
                mydef.add_conf(myconf)
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens / __init__.py View on Github external
x = ntrmap[hname].x
                y = ntrmap[hname].y
                z = ntrmap[hname].z
                bondatom = ntrmap[hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = defns.DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                # TODO - lots of arbitrary undefined numbers in this section
                for atom_ in refatoms:
                    if atom_ == 'N':
                        natom = defns.DefinitionAtom(atom_, 1.201, 0.847, 0.0)
                        myconf.add_atom(natom)
                    elif atom_ == 'CA':
                        caatom = defns.DefinitionAtom(atom_, 0.0, 0.0, 0.0)
                        myconf.add_atom(caatom)
                    elif atom_ == 'H':
                        caatom = defns.DefinitionAtom(atom_, 1.201, 1.847, 0.000)
                        myconf.add_atom(caatom)
                    else: pass
                mydef.add_conf(myconf)

        elif name in ['CTR']:
            for conformer in conformernames:
                for atom in atoms:
                    hname = atom
                    x = hmap[conformer, hname].x
                    y = hmap[conformer, hname].y
                    z = hmap[conformer, hname].z
                    bondatom = hmap[conformer, hname].bonds[0]
                    bondlength = 1.0
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / hydrogens.py View on Github external
x = ntrmap[hname].x
                y = ntrmap[hname].y
                z = ntrmap[hname].z
                bondatom = ntrmap[hname].bonds[0]
                bondlength = 1.0
                myconf = HydrogenConformation(hname, bondatom, bondlength)
                atom = DefinitionAtom(hname, x, y, z)
                myconf.add_atom(atom)

                # TODO - lots of arbitrary undefined numbers in this section
                for atom_ in refatoms:
                    if atom_ == 'N':
                        natom = DefinitionAtom(atom_, 1.201, 0.847, 0.0)
                        myconf.add_atom(natom)
                    elif atom_ == 'CA':
                        caatom = DefinitionAtom(atom_, 0.0, 0.0, 0.0)
                        myconf.add_atom(caatom)
                    elif atom_ == 'H':
                        caatom = DefinitionAtom(atom_, 1.201, 1.847, 0.000)
                        myconf.add_atom(caatom)
                    else: pass
                mydef.add_conf(myconf)

        elif name in ['CTR']:
            for conformer in conformernames:
                for atom in atoms:
                    hname = atom
                    x = hmap[conformer, hname].x
                    y = hmap[conformer, hname].y
                    z = hmap[conformer, hname].z
                    bondatom = hmap[conformer, hname].bonds[0]
                    bondlength = 1.0