Polymer

class Polymer(name: String) : Molecule

An extension to Molecule that supports residues in a chain topology, and separates mainchain from sidechain

Constructors

Link copied to clipboard
fun Polymer(name: String)

Types

Link copied to clipboard
class Chain(id: String)
Link copied to clipboard
class Residue(id: String, type: String)

Functions

Link copied to clipboard
fun bfs(source: Atom, visitSource: Boolean = false, shouldVisit: (fromAtom: Atom, toAtom: Atom, dist: Int) -> Boolean = { _, _, _ -> true }): Iterable<Molecule.Searched>

Crawl the bond network in breadth-first order starting at the source atom.

Link copied to clipboard
open override fun copy(): Polymer
Link copied to clipboard
fun copyTo(dst: Molecule): MoleculeMaps
fun copyTo(dst: Polymer): PolymerMaps
Link copied to clipboard
open override fun copyWithMaps(): Pair<Polymer, MoleculeMaps>

Copies the molecule and returns a map between the copied atoms, where A is this molecule and B is the copy.

Link copied to clipboard
fun dfs(source: Atom, visitSource: Boolean = false, shouldVisit: (fromAtom: Atom, toAtom: Atom, dist: Int) -> Boolean = { _, _, _ -> true }): Iterable<Molecule.Searched>

Crawl the bond network in depth-first order starting at the source atom.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun findChainAndResidue(atom: Atom): Pair<Polymer.Chain, Polymer.Residue>?
Link copied to clipboard
fun findChainOrThrow(id: String): Polymer.Chain
Link copied to clipboard
fun findResidue(atom: Atom): Polymer.Residue?
Link copied to clipboard
fun findResidueOrThrow(atom: Atom): Polymer.Residue
fun findResidueOrThrow(chainId: String, resId: String): Polymer.Residue
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun mapAtomsByNameTo(other: Molecule): AtomMap

Creates an atom map from this molecule to another molecule, assuming each atom name is unique. If the molecules are polymers, atom names need only be unique within a single residue.

Link copied to clipboard
fun mapAtomsByValueTo(other: Molecule): AtomMap

Creates an atom map from this molecule to another molecule, for only the atoms with identical values (ie, name, element, coordinates). Non-matching atoms will not be mapped.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val atoms: Molecule.Atoms
Link copied to clipboard
val bonds: Molecule.Bonds
Link copied to clipboard
val chains: MutableList<Polymer.Chain>
Link copied to clipboard
var name: String

A human-readable description for the molecule.

Link copied to clipboard
var netCharge: Int? = null

a formal net charge for the molecule, used by some forcefields to parameterize small molecules

Link copied to clipboard
var type: String? = null

A machine-readable descrition for the molecule, often 3 characters long.