Betaine¶
mbuild_polybuild.cg_monomers.betaine.Betaine
- class mbuild_polybuild.cg_monomers.betaine.Betaine(backbone_length=1, spacer_backbone=2, spacer_ion=1, polar_backbone=False, cap_group=False)[source]¶
Bases:
Compound
A generalized representation of a betaine monomer.
Ports¶
up: Connection with one side of the monomer.
down: Connection with another side of the monomer.
- Parameters:
backbone_length (int, optional, default=1) – Number of beads in the backbone chain of a monomer. This chain is perpendicular to the pendent group close to the center.
spacer_backbone (int, optional, default=2) – Number of backbone groups between the cation and backbone chain.
spacer_ion (int, optional, default=1) – Number of backbone groups between the cation and terminal anion.
polar_backbone (bool, optional, default=False) – If true, a polar group “_P” is added to the base of the pendent where it meets the chain.
cap_group (bool, optional, default=False) – Remove the “down” port for the monomer to create a capping monomer.
Examples
>>> from mbuild_polybuild.cg_monomers.betaine import Betaine >>> betaine = Betaine(backbone_length=2, spacer_backbone=3) >>> betaine.visualize()
Get the box of the Compound.
Get the cartesian center of the Compound based on its Particles.
Return the total charge of a compound.
Get the element of the Compound.
Return the total mass of a compound.
Return the maximum x, y, z coordinate of any particle in this compound.
Return the mimimum x, y, z coordinate of any particle in this compound.
Return the total number of bonds in the Compound.
Return the number of bonds a particle is directly involved in.
Return the number of Particles in the Compound.
Get the periodicity of the Compound.
Get the position of the Compound.
Get the Compound at the top of self's hierarchy.
Return all particle coordinates in this compound.
Return all particle coordinates in this compound including ports.
Betaine.add
(new_child[, label, containment, ...])Add a part to the Compound.
Betaine.add_bond
(particle_pair[, bond_order])Add a bond between two Particles.
Return all Ports referenced by this Compound and its successors.
Generate all ancestors of the Compound recursively.
Return all unoccupied Ports referenced by this Compound.
Betaine.bonds
([return_bond_order])Return all bonds in the Compound and sub-Compounds.
Betaine.check_for_overlap
(excluded_bond_depth)Check if a compound contains overlapping particles.
Betaine.condense
([inplace])Condense the hierarchical structure of the Compound to the level of molecules.
Betaine.direct_bonds
([graph_depth])Return a list of particles that this particle bonds to.
Betaine.energy_minimize
([forcefield, steps, ...])Perform an energy minimization on a Compound.
Betaine.flatten
([inplace])Flatten the hierarchical structure of the Compound.
Betaine.freud_generate_bonds
(name_a, name_b, ...)Add Bonds between all pairs of types a/b within [dmin, dmax].
Betaine.from_gmso
(topology[, coords_only, ...])Convert a GMSO Topology to mBuild Compound.
Betaine.from_parmed
(structure[, ...])Extract atoms and bonds from a pmd.Structure.
Betaine.from_pybel
(pybel_mol[, use_element, ...])Create a Compound from a Pybel.Molecule.
Betaine.from_trajectory
(traj[, frame, ...])Extract atoms and bonds from a md.Trajectory.
Betaine.generate_bonds
(name_a, name_b, dmin, ...)Add Bonds between all pairs of types a/b within [dmin, dmax].
Betaine.get_boundingbox
([pad_box])Compute the bounding box of the compound.
Get SMILES string for compound.
Return True if there is no bond between particles of the Compound to an external Compound.
Betaine.min_periodic_distance
(xyz0, xyz1)Vectorized distance calculation considering minimum image.
Betaine.particles
([include_ports])Return all Particles of the Compound.
Betaine.particles_by_element
(element)Return all Particles of the Compound with a specific element.
Return all Particles of the Compound with a specific name.
Betaine.particles_in_range
(compound, dmax[, ...])Find particles within a specified range of another particle.
Betaine.print_hierarchy
([print_full, index, ...])Print the hierarchy of the Compound.
Return all Ports referenced by this Compound.
Betaine.remove
(objs_to_remove[, reset_labels])Remove children from the Compound cleanly.
Betaine.remove_bond
(particle_pair)Delete a bond between a pair of Particles.
Reset Compound labels so that substituents and ports are renumbered, indexed from port[0] to port[N], where N-1 is the number of ports.
Betaine.rotate
(theta, around)Rotate Compound around an arbitrary vector.
Betaine.rotate_dihedral
(bond, phi)Rotate a dihedral about a central bond.
Betaine.save
(filename[, include_ports, box, ...])Save the Compound to a file.
Betaine.spin
(theta, around[, anchor])Rotate Compound in place around an arbitrary vector.
Yield Compounds below self in the hierarchy.
Betaine.to_gmso
(**kwargs)Create a GMSO Topology from a mBuild Compound.
Betaine.to_hoomdsnapshot
(**kwargs)Create a HOOMD-Blue snapshot from an mBuild Compound.
Betaine.to_intermol
([molecule_types])Create an InterMol system from a Compound.
Betaine.to_networkx
([names_only])Create a NetworkX graph representing the hierarchy of a Compound.
Betaine.to_parmed
([box, title, residues, ...])Create a ParmEd Structure from a Compound.
Betaine.to_pybel
([box, title, residues, ...])Create a pybel.Molecule from a Compound.
Create an RDKit RWMol from an mBuild Compound.
Betaine.to_smiles
([backend])Create a SMILES string from an mbuild compound.
Betaine.to_trajectory
([include_ports, ...])Convert to an md.Trajectory and flatten the compound.
Translate the Compound by a vector.
Betaine.translate_to
(pos)Translate the Compound to a specific position.
Betaine.update_coordinates
(filename[, ...])Update the coordinates of this Compound from a file.
Betaine.visualize
([show_ports, backend, ...])Visualize the Compound using py3dmol (default) or nglview.