Exemple #1
0
    def get_coordinates(self, segid, resid):
        """
        Obtains atom coordinates in a given residue

        Args:
            segid (str): Segment ID to query
            resid (str or int): Residue ID to query

        Returns:
            (list of 3-tuple): (x,y,z) position of all atoms in residue
        """
        if isinstance(resid, int):
            resid = str(resid)

        return _psfgen.query_atoms(psfstate=self._data,
                                   segid=segid,
                                   resid=resid,
                                   task="coordinates")
Exemple #2
0
    def get_velocities(self, segid, resid):
        """
        Obtains atom velocities in a given residue, if set

        Args:
            segid (str): Segment ID to query
            resid (str or int): Residue ID to query

        Returns:
            (list of 3-tuple): (vx,vy,vz) velocities of all atoms in residue
        """
        if isinstance(resid, int):
            resid = str(resid)

        return _psfgen.query_atoms(psfstate=self._data,
                                   segid=segid,
                                   resid=resid,
                                   task="velocities")
Exemple #3
0
    def get_atom_indices(self, segid, resid):
        """
        Obtains atom indices/IDs in a given residue

        Args:
            segid (str): Segment ID to query
            resid (str or int): Residue ID to query

        Returns:
            (list of int): Atom IDs in residue
        """
        if isinstance(resid, int):
            resid = str(resid)

        return _psfgen.query_atoms(psfstate=self._data,
                                   segid=segid,
                                   resid=resid,
                                   task="atomid")