PoreMS 0.3
  • API
  • Molecule
  • Pore
  • Workflow
  • Pore shape examples
  • Site
    • Page
        • Molecule.add
          • Molecule.add()
    • Molecule.add
      • Molecule.add()
    Source

    Molecule.add¶

    Molecule.add(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_typestring

    Atom type

    posinteger, list

    Position of the atom

    bondlist, optional

    Bond axis

    rfloat, optional

    Bond length

    thetafloat, optional

    Azimuthal angle

    phifloat, optional

    Polar angle

    is_degbool, optional

    True if the input of the angles in degree

    namestring, optional

    Optionally set a unique atom name

    residueinteger, 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 7.4.6.