def pdb(self, value): with self.workdir: self._pdb = "{}.pdb".format(self.name) if isinstance(value, _BSS._SireWrappers.System): _BSS.IO.saveMolecules(self.name, value, "pdb") elif isinstance(value, _BSS._SireWrappers.Molecule): _BSS.IO.saveMolecules(self.name, _BSS._SireWrappers.System(value), "pdb") elif isinstance(value, _pmd.Structure): _pmdwrap.saveFilesFromParmed(value, self._pdb) else: self._pdb = None if value is not None: value = _fileio.checkFileExists(value) if value: try: try: self._pdb = value self._pdb_obj = _PDB.PDB(self.pdb) except: obj = _pmdwrap.openFilesAsParmed(value) self._pdb = "{}.pdb".format(self.name) _pmdwrap.saveFilesFromParmed(obj, self._pdb) self._pdb_obj = _PDB.PDB(self.pdb) self._checkfasta() except: self._pdb = None if not self._pdb: self._pdb_obj = _PDB.PDB(self.pdb) if self.pdb else None
def parametrised_files(self, val): with self.workdir: if val is None: self._parametrised_files = None self._parametrised = False else: val = _fileio.checkFileExists(val) self._parametrised_files = val self._parametrised = True
def protonated_filename(self, val): with self.workdir: if val is None: self._protonated_filename = None self._protonated = False else: self._protonated_filename = _fileio.checkFileExists(val) self._molecule = _rdkit.openAsRdkit(self._protonated_filename, removeHs=False, minimise=self.minimise) self._string = _rdmolfiles.MolToSmiles(self.molecule) self._protonated = True
def fasta(self, value): if value is not None: value = _fileio.checkFileExists(value) self._fasta = value if value: self._checkfasta()