Beispiel #1
0
    public string Save()
    {
        var bonds       = DataObject.Bonds.Where(bond => Isolation.Count(atom => bond.Atoms.Contains(atom)) == 2);
        var mol         = DataObject.BondDataProvider != null ? new Molecule(Isolation.ToList(), bonds) : new Molecule(Isolation.ToList());
        var folder      = Path.GetDirectoryName(_path);
        var file        = Path.GetFileNameWithoutExtension(_path);
        var createdFile = folder + "/" + file + "_isolation.mol2";

        Mol2Exporter.Export(mol, createdFile);
        return(createdFile);
    }
 public static void ExportMolecule(this AnalysisViewModel viewModel, string path) => Mol2Exporter.Export(viewModel.Parent.Macrocycle, path + "_molecule.mol2");
 public static void ExportCycle(this AnalysisViewModel viewModel, string path) => Mol2Exporter.Export(new Molecule(viewModel.Analysis.Atoms), path + "_cycle.mol2");