Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
pestifer 2.5.2 documentation
pestifer 2.5.2 documentation
  • Introduction
  • Installation
  • Usage
    • config-help
    • build
      • fetch
      • continuation
      • merge
      • psfgen
        • patches
        • mutations
        • deletions
        • insertions
        • crotations
        • transrot
        • ssbonds and ssbondsdelete
        • links
        • substitutions
        • grafts
      • validate
      • pdb2pqr
      • md
      • manipulate
        • crotations
        • transrot
        • align
        • transfer_coords
      • ligate
      • cleave
      • solvate
      • make_membrane_system
      • ring_check
      • terminate
    • build-example
    • fetch-example
    • new-system
    • wheretcl
    • make-pdb-collection
    • make-ligand-mol2
    • desolvate
    • make-namd-restart
    • show-resources
    • follow-namd-log
    • mdplot
    • modify-package
    • setup-vmd
  • Examples
    • Example 1: Bovine Pancreatic Trypsin Inhibitor (BPTI)
    • Example 2: BPTI Excluding the Phosphate Ion
    • Example 3: BPTI with a Mutated-out Disulfide Bond
    • Example 4: BPTI with a Mutated-in Disulfide Bond
    • Example 5: HIV Protease with Patches to Protonate Aspartates
    • Example 6: Fasciculin 1 at pH 7.0
    • Example 7: Closed, Unliganded HIV-1 BG505 Env SOSIP.664 Trimer
    • Example 8: Closed, PGT122/35O22-Liganded HIV-1 BG505 Env SOSIP.664 Trimer (ligands removed)
    • Example 9: Cleaved, Asymmetric HIV-1 AD8 Env Ectodomain Trimer
    • Example 10: Cleaved, Asymmetric HIV-1 AE2 Env Ectodomain Trimer
    • Example 11: Open, Symmetric D9/CD4-liganded HIV-1 SOSIP Env Ectodomain Trimer (ligands removed)
    • Example 12: Open, Symmetric 17b/CD4-liganded HIV-1 B41 SOSIP Env Ectodomain Trimer
    • Example 13: DES-PHE B1 Bovine Insulin Hexamer
    • Example 14: Human Insulin Receptor Ectodomain IRαβ
    • Example 15: Fully Glycosylated, Closed SARS-CoV-2 Omicron BA.2 Variant Spike
    • Example 16: HIV-1 Env MPER-TM Trimer in a DMPC Symmetric Bilayer
    • Example 17: HIV-1 Env MPER-TM Trimer in an Asymmetric, Model Viral Bilayer
    • Example 18: E. coli Replicative DNA Polymerase Complex Bound to DNA
    • Example 19: Sperm whale myoglobin
    • Example 20: Mitochondrial methylmalonyl-CoA mutase (Alphafold P22033)
    • Example 21: Asymmetric GroEL/GroES Chaperonin Complex
    • Example 22: Ferredoxin-NADP(H) Reductase from Rhodobacter capsulatus
  • Configuration File Reference
    • charmmff
      • user_pdbcollections
      • standard
        • rtf
        • str
        • prm
      • custom
        • rtf
        • str
        • prm
      • user_custom
        • searchpath
        • rtf
        • str
        • prm
        • segtypes
    • psfgen
      • aliases
        • atom
        • residue
    • namd
      • gpu-resident
      • deprecated3
      • generic
      • vacuum
      • solvated
      • thermostat
      • barostat
      • membrane
      • harmonic
    • paths
    • tasks
      • fetch
      • continuation
      • merge
      • psfgen
        • source
          • sequence
            • build_zero_occupancy_C_termini
            • build_zero_occupancy_N_termini
            • loops
              • declash
            • glycans
              • declash
        • mods
      • ligate
        • steer
          • constraints
        • connect
      • pdb2pqr
      • mdplot
        • logs
        • figsize
        • timeseries
        • units
        • axis-labels
      • cleave
      • domainswap
      • solvate
      • desolvate
      • ring_check
        • segtypes
      • make_membrane_system
        • compute_pressure_profile
        • bilayer
          • prebuilt
          • patch_nlipids
          • composition
          • relaxation_protocols
            • patch
              • md
                • addl_paramfiles
                • other_parameters
            • quilt
              • md
                • addl_paramfiles
                • other_parameters
        • embed
      • md
        • addl_paramfiles
        • constraints
        • ssrestraints
      • manipulate
        • mods
      • terminate
        • test_standards
        • package
          • namd
            • addl_paramfiles
            • constraints
      • validate
        • tests
          • attribute_test
          • connection_test
          • residue_test
  • API
    • pestifer package
      • pestifer.charmmff package
        • pestifer.charmmff.ligand_paramgen package
          • pestifer.charmmff.ligand_paramgen.mol2_writer module
          • pestifer.charmmff.ligand_paramgen.orchestrator module
          • pestifer.charmmff.ligand_paramgen.protonation module
          • pestifer.charmmff.ligand_paramgen.rcsb module
        • pestifer.charmmff.charmmffcontent module
        • pestifer.charmmff.charmmffprm module
        • pestifer.charmmff.charmmfftop module
        • pestifer.charmmff.graphhelpers module
        • pestifer.charmmff.make_pdb_collection module
        • pestifer.charmmff.pdbrepository module
      • pestifer.cli package
        • pestifer.cli.pestifer module
        • pestifer.cli.subcommand module
      • pestifer.core package
        • pestifer.core.artifacts module
        • pestifer.core.baseobj module
        • pestifer.core.command module
        • pestifer.core.config module
        • pestifer.core.controller module
        • pestifer.core.errors module
        • pestifer.core.example module
        • pestifer.core.examplemanager module
        • pestifer.core.labels module
        • pestifer.core.objmanager module
        • pestifer.core.pipeline module
        • pestifer.core.resourcemanager module
      • pestifer.logparsers package
        • pestifer.logparsers.logparser module
        • pestifer.logparsers.namdlogparser module
        • pestifer.logparsers.packmollogparser module
        • pestifer.logparsers.pdb2pqrlogparser module
        • pestifer.logparsers.psfgenlogparser module
      • pestifer.molecule package
        • pestifer.molecule.asymmetricunit module
        • pestifer.molecule.atom module
        • pestifer.molecule.bilayer module
        • pestifer.molecule.bioassemb module
        • pestifer.molecule.chainidmanager module
        • pestifer.molecule.molecule module
        • pestifer.molecule.residue module
        • pestifer.molecule.segment module
        • pestifer.molecule.stateinterval module
        • pestifer.molecule.transform module
      • pestifer.objs package
        • pestifer.objs.align module
        • pestifer.objs.cfusion module
        • pestifer.objs.cleavagesite module
        • pestifer.objs.crot module
        • pestifer.objs.deletion module
        • pestifer.objs.graft module
        • pestifer.objs.insertion module
        • pestifer.objs.link module
        • pestifer.objs.mutation module
        • pestifer.objs.orient module
        • pestifer.objs.patch module
        • pestifer.objs.resid module
        • pestifer.objs.rottrans module
        • pestifer.objs.seqadv module
        • pestifer.objs.ssbond module
        • pestifer.objs.ssbonddelete module
        • pestifer.objs.substitution module
        • pestifer.objs.ter module
        • pestifer.objs.transfer_coords module
      • pestifer.psfutil package
        • pestifer.psfutil.psfangle module
        • pestifer.psfutil.psfatom module
        • pestifer.psfutil.psfbond module
        • pestifer.psfutil.psfcontents module
        • pestifer.psfutil.psfdihedral module
        • pestifer.psfutil.psfpairex module
        • pestifer.psfutil.psfpatch module
        • pestifer.psfutil.psfremark module
        • pestifer.psfutil.psfring module
        • pestifer.psfutil.psftopoelement module
      • pestifer.resources package
      • pestifer.schema package
      • pestifer.scripters package
        • pestifer.scripters.generic module
        • pestifer.scripters.namd module
        • pestifer.scripters.namd_colvar_input module
        • pestifer.scripters.packmol module
        • pestifer.scripters.psfgen module
        • pestifer.scripters.tcl module
        • pestifer.scripters.vmd module
      • pestifer.sphinxext package
        • pestifer.sphinxext.sphinx_examplemanager module
        • pestifer.sphinxext.task_table module
        • pestifer.sphinxext.tclscript module
        • pestifer.sphinxext.toctree_util module
      • pestifer.subcommands package
        • pestifer.subcommands.build module
        • pestifer.subcommands.build_example module
        • pestifer.subcommands.config_default module
        • pestifer.subcommands.config_help module
        • pestifer.subcommands.desolvate module
        • pestifer.subcommands.fetch_example module
        • pestifer.subcommands.follow_namd_log module
        • pestifer.subcommands.make_ligand_mol2 module
        • pestifer.subcommands.make_namd_restart module
        • pestifer.subcommands.make_pdbcollection module
        • pestifer.subcommands.mdplot module
        • pestifer.subcommands.modify_package module
        • pestifer.subcommands.new_system module
        • pestifer.subcommands.rebuild_charmmff_cache module
        • pestifer.subcommands.setup_vmd module
        • pestifer.subcommands.show_resources module
        • pestifer.subcommands.wheretcl module
      • pestifer.tasks package
        • pestifer.tasks.basetask module
        • pestifer.tasks.cleave module
        • pestifer.tasks.continuation module
        • pestifer.tasks.desolvate module
        • pestifer.tasks.domainswap module
        • pestifer.tasks.fetch module
        • pestifer.tasks.ligate module
        • pestifer.tasks.make_membrane_system module
        • pestifer.tasks.manipulate module
        • pestifer.tasks.mdplot module
        • pestifer.tasks.mdtask module
        • pestifer.tasks.merge module
        • pestifer.tasks.pdb2pqr module
        • pestifer.tasks.psfgen module
        • pestifer.tasks.pytest_buildterminate module
        • pestifer.tasks.ringcheck module
        • pestifer.tasks.solvate module
        • pestifer.tasks.taskcollections module
        • pestifer.tasks.terminate module
        • pestifer.tasks.validate module
      • pestifer.util package
        • pestifer.util.cacheable_object module
        • pestifer.util.cifutil module
        • pestifer.util.colors module
        • pestifer.util.coord module
        • pestifer.util.formatvalidator module
        • pestifer.util.gitutil module
        • pestifer.util.linkcell module
        • pestifer.util.namdrestart module
        • pestifer.util.patch module
        • pestifer.util.progress module
        • pestifer.util.pytest_plugin module
        • pestifer.util.readme_to_changelog_with_dates module
        • pestifer.util.spinner_wrapper module
        • pestifer.util.stringthings module
        • pestifer.util.units module
        • pestifer.util.util module
  • Tcl sources
    • Top-level scripts
    • Tcl scripts
    • Tcl packages
  • Changelog
Back to top
View this page

pestifer.objs.link module¶

A Link is a covalent bond between two residues in a protein structure.

class pestifer.objs.link.Link(*args, chainID1: str, resid1: ResID, name1: str, chainID2: str, resid2: ResID, name2: str, altloc1: str | None = None, altloc2: str | None = None, resname1: str | None = None, resname2: str | None = None, sym1: str | None = None, sym2: str | None = None, link_distance: float | None = None, segname1: str | None = None, segname2: str | None = None, residue1: Residue = None, residue2: Residue = None, atom1: Atom = None, atom2: Atom = None, empty: bool | None = None, segtype1: str | None = None, segtype2: str | None = None, ptnr1_label_asym_id: str | None = None, ptnr2_label_asym_id: str | None = None, ptnr1_label_seq_id: str | None = None, ptnr2_label_seq_id: str | None = None, ptnr1_label_comp_id: str | None = None, ptnr2_label_comp_id: str | None = None, ptnr1_auth_asym_id: str | None = None, ptnr2_auth_asym_id: str | None = None, ptnr1_auth_seq_id: str | None = None, ptnr2_auth_seq_id: str | None = None, ptnr1_auth_comp_id: str | None = None, ptnr2_auth_comp_id: str | None = None, patchname: str | None = None, patchhead: int | None = None)[source]¶

Bases: BaseObj

A class for handling covalent bonds between residues where at least one residue is non-protein

altloc1: str | None¶
altloc2: str | None¶
atom1: Atom¶
atom2: Atom¶
chainID1: str¶
chainID2: str¶
empty: bool | None¶
link_distance: float | None¶
model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': False}¶

Configuration for pydantic.BaseModel.

model_post_init(context: Any, /) → None¶

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

name1: str¶
name2: str¶

Required attributes for a Link object. These attributes must be provided when creating a Link object.

  • chainID1: The chain ID of the first residue in the link.

  • resid1: The residue ID of the first residue in the link.

  • name1: The name of the first atom in the link.

  • chainID2: The chain ID of the second residue in the link.

  • resid2: The residue ID of the second residue in the link.

  • name2: The name of the second atom in the link.

patchhead: int | None¶

Optional attributes for a Link object. These attributes can be provided to modify the behavior of the link. - residue1: The first residue object in the link. - residue2: The second residue object in the link. - atom1: The first atom object in the link. - atom2: The second atom object in the link. - empty: A boolean indicating if the link is empty. - segtype1: The segment type of the first residue. - segtype2: The segment type of the second residue. - ptnr1_label_asym_id: The asym ID of the first partner in the link (mmCIF). - ptnr2_label_asym_id: The asym ID of the second partner in the link (mmCIF). - ptnr1_label_seq_id: The sequence ID of the first partner in the link (mmCIF). - ptnr2_label_seq_id: The sequence ID of the second partner in the link (mmCIF). - ptnr1_label_comp_id: The component ID of the first partner in the link (mmCIF). - ptnr2_label_comp_id: The component ID of the second partner in the link (mmCIF). - ptnr1_auth_asym_id: The author asym ID of the first partner in the link (mmCIF). - ptnr2_auth_asym_id: The author asym ID of the second partner in the link (mmCIF). - ptnr1_auth_seq_id: The author sequence ID of the first partner in the link (mmCIF). - ptnr2_auth_seq_id: The author sequence ID of the second partner in the link (mmCIF). - ptnr1_auth_comp_id: The author component ID of the first partner in the link (mmCIF). - ptnr2_auth_comp_id: The author component ID of the second partner in the link (mmCIF). - patchname: The name of the patch applied to the link. - patchhead: 1 = residue1 is the first residue in the link, 2 = residue2 is the first residue in the link.

patchname: str | None¶
ptnr1_auth_asym_id: str | None¶
ptnr1_auth_comp_id: str | None¶
ptnr1_auth_seq_id: str | None¶
ptnr1_label_asym_id: str | None¶
ptnr1_label_comp_id: str | None¶
ptnr1_label_seq_id: str | None¶
ptnr2_auth_asym_id: str | None¶
ptnr2_auth_comp_id: str | None¶
ptnr2_auth_seq_id: str | None¶
ptnr2_label_asym_id: str | None¶
ptnr2_label_comp_id: str | None¶
ptnr2_label_seq_id: str | None¶
resid1: ResID¶
resid2: ResID¶
residue1: Residue¶
residue2: Residue¶
resname1: str | None¶
resname2: str | None¶
segname1: str | None¶
segname2: str | None¶
segtype1: str | None¶
segtype2: str | None¶
set_patchname(force=False)[source]¶

Set the charmmff patch name for this link. This method assigns a patch name based on the residues involved in the link. If the patch name is already set and force is False, it will not change the patch name. This method does not return any value. It modifies the patchname attribute of the Link object. It checks the residues involved in the link and assigns a patch name based on predefined mappings.

Parameters:

force (bool, optional) – If True, forces the patch name to be set even if it is already assigned. Default is False.

shortcode() → str[source]¶

Returns a string representation of the link in the format ‘C1_R1_A1-C2_R2_A2’.

sym1: str | None¶
sym2: str | None¶
update_residue(idx, **fields)[source]¶

Updates the chainID of the residue in the link based on the index provided

Parameters:
  • idx (int) – 1 for residue1, 2 for residue2

  • fields (dict) – a dictionary of fields to update; currently only ‘chainID’ is supported

class pestifer.objs.link.LinkList(initlist: Iterable[T] = ())[source]¶

Bases: BaseObjList[Link]

A class for handling lists of Links

apply_segtypes(map)[source]¶

Apply segtype values to each of the two residues using the map

Parameters:

map (dict) – map of segtypes for given resnames

assign_residues(Residues: ResidueList) → tuple['ResidueList', 'LinkList'][source]¶

Assigns residue and atom pointers to each link; sets up the up and down links of both residues so that linked residue objects can reference one another; flags residues from list of residues passed in that are not assigned to any links

Parameters:

Residues (ResidueList) – list of residues to assign to links; this is typically a list of all residues in the structure, but it can also be a list of residues that are not linked to any other residues, such as when reading in a set of links from a pre-built psf file.

Returns:

Residues – list of residues from Residues that are not used for any assignments

Return type:

ResidueList

describe() → str[source]¶

Returns a string description of the LinkList.

Returns:

A string describing the number of links in the list.

Return type:

str

classmethod from_cif(dc: DataContainer) → LinkList[source]¶

Create a LinkList from a CIF DataContainer.

Parameters:

dc (DataContainer) – A CIF DataContainer containing the necessary fields to create Link objects.

Returns:

An instance of LinkList created from the CIF DataContainer.

Return type:

LinkList

classmethod from_pdb(pdb: PDBRecordDict) → LinkList[source]¶

Create a LinkList from a PDBRecordDict.

remove_links_to(r) → LinkList[source]¶

Remove all links to a specific residue.

Parameters:

Residue (Residue) – The residue to remove links to.

Returns:

A new LinkList containing the removed links.

Return type:

LinkList

report() → str[source]¶

Report the string representation of each link in the list.

pestifer.objs.link.ic_reference_closest(res12: list['Residue'], ICmaps: list[dict]) → str[source]¶

Given the two Residues in res12 and the maps in ICmaps, return the mapping key to which the given IC values are closest in a Euclidean sense.

This method will identify the four atoms of the IC and reference them directly when calling the measure_dihedral function.

The list of computed dihedral values from the set of atoms is a “point” in “IC-space”, and each patch has its own “reference point” in this space.

The reference point to which the point is closest is identified as the desired result.

Parameters:
  • res12 (list) – exactly two Residue objects which must have lists of atoms attributes

  • ICMaps (list of dict) –

    A list of dictionaries, each with the following structure:

    Key

    Description

    ICatomnames

    List of 4 atom names as they appear in the CHARMM FF IC.

    mapping

    Dictionary mapping patch names to IC values.

Next
pestifer.objs.mutation module
Previous
pestifer.objs.insertion module
Copyright © 2023-2025, Cameron F. Abrams
Made with Sphinx and @pradyunsg's Furo
GitHub LinkedIn
On this page
  • pestifer.objs.link module
    • Link
      • Link.altloc1
      • Link.altloc2
      • Link.atom1
      • Link.atom2
      • Link.chainID1
      • Link.chainID2
      • Link.empty
      • Link.link_distance
      • Link.model_config
      • Link.model_post_init()
      • Link.name1
      • Link.name2
      • Link.patchhead
      • Link.patchname
      • Link.ptnr1_auth_asym_id
      • Link.ptnr1_auth_comp_id
      • Link.ptnr1_auth_seq_id
      • Link.ptnr1_label_asym_id
      • Link.ptnr1_label_comp_id
      • Link.ptnr1_label_seq_id
      • Link.ptnr2_auth_asym_id
      • Link.ptnr2_auth_comp_id
      • Link.ptnr2_auth_seq_id
      • Link.ptnr2_label_asym_id
      • Link.ptnr2_label_comp_id
      • Link.ptnr2_label_seq_id
      • Link.resid1
      • Link.resid2
      • Link.residue1
      • Link.residue2
      • Link.resname1
      • Link.resname2
      • Link.segname1
      • Link.segname2
      • Link.segtype1
      • Link.segtype2
      • Link.set_patchname()
      • Link.shortcode()
      • Link.sym1
      • Link.sym2
      • Link.update_residue()
    • LinkList
      • LinkList.apply_segtypes()
      • LinkList.assign_residues()
      • LinkList.describe()
      • LinkList.from_cif()
      • LinkList.from_pdb()
      • LinkList.remove_links_to()
      • LinkList.report()
    • ic_reference_closest()