PoreMS 0.2
  • API
  • Process
  • Molecule
  • Pore
  • Workflow
  • Site
    • Page
        • Molecule.add

    Molecule.add¶

    Molecule.add(self, atom_type, pos, bond=[], r=0, theta=0, phi=0, is_deg=True, name='', residue=0)¶

    Add a new atom in polar coordinates. The pos input is either an atom id, that determines is the bond-start, or a vector for a specific position.

    If the polar coordinates are dependent on a bond vector as an axis, the bond variable must be set. The coordinate system is then transformed to the bond axis. If this variable is set to an empty list, then the given coordinates are assumed to be dependent on the z-axis.

    Parameters:
    atom_type : string

    Atom type

    pos : integer, list

    Position of the atom

    bond : list, optional

    Bond axis

    r : float, optional

    Bond length

    theta : float, optional

    Azimuthal angle

    phi : float, optional

    Polar angle

    is_deg : bool, optional

    True if the input of the angles in degree

    name : string, optional

    Optionally set a unique atom name

    residue : integer, optional

    Residue number

    Examples

    mol.add("C", [0, 0, 0])
    mol.add("C", 0, r=0.153, theta=-135)
    mol.add("C", 1, [0, 1], r=0.153, theta= 135)
    

    Back to top

    © Copyright 2021, Hamzeh Kraus.
    Created using Sphinx 1.6.6.