How to use the pdb2pqr.pdb2pqr.propka.group.Group 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 / propka / group.py View on Github external
# set the center using the nitrogen
        self.set_center([self.atom])
        self.set_interaction_atoms(the_hydrogen+[self.atom], the_hydrogen+[self.atom])
        return



class F_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'F'
        self.residue_type = 'F'
        info('Found F   group:', atom)
        return

class Cl_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'Cl'
        self.residue_type = 'Cl'
        info('Found Cl   group:', atom)
        return

class OH_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'OH'
        self.residue_type = 'OH'
        info('Found OH  group:', atom)
        return
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
self.residue_type = 'OCO'
        info('Found OCO group:', atom)
        return

    def setup_atoms(self):
        # Identify the two caroxyl oxygen atoms
        the_oxygens = self.atom.get_bonded_elements('O')

        # set the center using the two oxygen carboxyl atoms
        self.set_center(the_oxygens)
        self.set_interaction_atoms(the_oxygens, the_oxygens)
        return



class N30_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'N30'
        self.residue_type = 'N30'
        info('Found N30 group:', atom)
        return

    def setup_atoms(self):
        # Identify the nitrogens
        my_protonator.protonate_atom(self.atom)
        the_hydrogens = self.atom.get_bonded_elements('H')
        # set the center using the nitrogen
        self.set_center([self.atom])
        self.set_interaction_atoms(the_hydrogens+[self.atom], [self.atom])
        return
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
def setup_atoms(self):
        # Identify the nitrogens
        the_nitrogens = self.atom.get_bonded_elements('N')

        # set the center using the nitrogen
        self.set_center([self.atom])

        the_hydrogens = []
        for n in the_nitrogens:
            my_protonator.protonate_atom(n)
            the_hydrogens += n.get_bonded_elements('H')
        self.set_interaction_atoms(the_hydrogens+the_nitrogens, the_nitrogens)

        return

class C2N_group(Group):
    """Amidinium group"""
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'C2N'
        self.residue_type = 'C2N'
        info('Found C2N group:', atom)
        return

    def setup_atoms(self):
        # Identify the nitrogens
        the_nitrogens = self.atom.get_bonded_elements('N')
        the_nitrogens = [n for n in the_nitrogens if len(n.get_bonded_heavy_atoms())==1]

        # set the center using the nitrogen
        self.set_center([self.atom])
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
self.set_center([self.atom])
        #self.set_interaction_atoms(the_hydrogen+[self.atom], the_hydrogen+[self.atom])
        self.set_interaction_atoms([self.atom], [self.atom])
        return


class O3_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'O3'
        self.residue_type = 'O3'
        info('Found O3  group:', atom)
        return


class O2_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'O2'
        self.residue_type = 'O2'
        info('Found O2  group:', atom)
        return

class SH_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'SH'
        self.residue_type = 'SH'
        info('Found SH  group:', atom)
        return
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
# set the center using the nitrogen
        self.set_center([self.atom])
        self.set_interaction_atoms(the_hydrogens+[self.atom], [self.atom])
        return

class N1_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'N1'
        self.residue_type = 'N1'
        info('Found N1 group:', atom)
        return



class Ion_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'ION'
        self.residue_type = atom.res_name.strip()
        info('Found ion group:', atom)
        return


class non_titratable_ligand_group(Group):
    def __init__(self, atom):
        Group.__init__(self, atom)
        self.type = 'LG'
        self.residue_type = 'LG'
#        info('Non-titratable ligand group',atom)
        return
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'F'
        self.residue_type = 'F'
        info('Found F   group:', atom)
        return

class Cl_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'Cl'
        self.residue_type = 'Cl'
        info('Found Cl   group:', atom)
        return

class OH_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'OH'
        self.residue_type = 'OH'
        info('Found OH  group:', atom)
        return


    def setup_atoms(self):
        # Identify the hydrogen
        my_protonator.protonate_atom(self.atom)
        the_hydrogen = self.atom.get_bonded_elements('H')

        # set the center using the nitrogen
        self.set_center([self.atom])
        self.set_interaction_atoms(the_hydrogen+[self.atom], the_hydrogen+[self.atom])
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
return


    def setup_atoms(self):
        # Identify the hydrogen
        my_protonator.protonate_atom(self.atom)
        #the_hydrogen = self.atom.get_bonded_elements('H')

        # set the center using the oxygen
        self.set_center([self.atom])
        #self.set_interaction_atoms(the_hydrogen+[self.atom], the_hydrogen+[self.atom])
        self.set_interaction_atoms([self.atom], [self.atom])
        return


class O3_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'O3'
        self.residue_type = 'O3'
        info('Found O3  group:', atom)
        return


class O2_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'O2'
        self.residue_type = 'O2'
        info('Found O2  group:', atom)
        return
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
return


    def setup_atoms(self):
        # Identify the hydrogen
        my_protonator.protonate_atom(self.atom)
        the_hydrogen = self.atom.get_bonded_elements('H')

        # set the center using the nitrogen
        self.set_center([self.atom])
        self.set_interaction_atoms(the_hydrogen+[self.atom], the_hydrogen+[self.atom])
        return



class F_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'F'
        self.residue_type = 'F'
        info('Found F   group:', atom)
        return

class Cl_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'Cl'
        self.residue_type = 'Cl'
        info('Found Cl   group:', atom)
        return

class OH_group(Group):
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
Group.__init__(self,atom)
        self.type = 'ION'
        self.residue_type = atom.res_name.strip()
        info('Found ion group:', atom)
        return


class non_titratable_ligand_group(Group):
    def __init__(self, atom):
        Group.__init__(self, atom)
        self.type = 'LG'
        self.residue_type = 'LG'
#        info('Non-titratable ligand group',atom)
        return

class titratable_ligand_group(Group):
    def __init__(self, atom):
        Group.__init__(self, atom)
        # set the charge and determine type (acid or base)
        self.charge = atom.charge
        if self.charge <0:
            self.type = 'ALG'
            self.residue_type = 'ALG'
        elif self.charge > 0:
            self.type = 'BLG'
            self.residue_type = 'BLG'
        else:
            raise Exception('Unable to determine type of ligand group - charge not set?')


        # check if marvin model pka has been calculated
        # this is not true if we are reading an input file
github Electrostatics / apbs-pdb2pqr / pdb2pqr / pdb2pqr / propka / group.py View on Github external
charge = self.charge*(y/(1.0+y))

        return charge

    def use_in_calculations(self):
        """
        Whether this group should be included in the results report. If
        --titrate_only option is specified, only residues that are titratable
        and are in that list are included; otherwise all titratable residues
        and CYS residues are included.
        """
        return self.titratable or (self.residue_type == 'CYS' and \
                                   not self.exclude_cys_from_results)


class COO_group(Group):
    def __init__(self, atom):
        Group.__init__(self,atom)
        self.type = 'COO'

    def setup_atoms(self):
        # Identify the two caroxyl oxygen atoms
        the_oxygens = self.atom.get_bonded_elements('O')

        # set the center using the two oxygen carboxyl atoms (if present)
        if the_oxygens:
            self.set_center(the_oxygens)
        else:
            self.set_center([self.atom])
            # FIXME perhaps it would be better to ignore this group completely
            # if the oxygen is missing from this residue?