$darkmode
DENOPTIM
denoptim.io.DenoptimIO Class Reference

Utility methods for input/output. More...

Collaboration diagram for denoptim.io.DenoptimIO:
[legend]

Static Public Member Functions

static Object readDENOPTIMData (String pathname) throws Exception
 Reads any content of a given pathname and tries to read DENOPTIM data from it. More...
 
static List< CandidatereadGenerationFromSummary (File file) throws DENOPTIMException
 Reads a FileFormat#GENSUMMARY file and searches all the files defining each member of the population. More...
 
static List< IAtomContainer > readAllAtomContainers (File file) throws IOException, CDKException
 Returns a single collection with all atom containers found in a file of any format. More...
 
static ArrayList< IAtomContainer > readSDFFile (String fileName) throws DENOPTIMException
 Reads a file containing multiple molecules (multiple SD format)) More...
 
static File writeVertexesToFile (File file, FileFormat format, List< Vertex > vertexes) throws DENOPTIMException
 Writes vertexes to file. More...
 
static File writeVertexToFile (File file, FileFormat format, Vertex vertex, boolean append) throws DENOPTIMException
 Writes vertexes to file. More...
 
static File writeVertexesToFile (File file, FileFormat format, List< Vertex > vertexes, boolean append) throws DENOPTIMException
 Writes vertexes to file. More...
 
static void writeVertexesToJSON (File file, List< Vertex > vertexes) throws DENOPTIMException
 Writes vertexes to JSON file. More...
 
static void writeVertexesToJSON (File file, List< Vertex > vertexes, boolean append) throws DENOPTIMException
 Writes vertexes to JSON file. More...
 
static void writeVertexToSDF (String pathName, Vertex vertex) throws DENOPTIMException
 Writes a vertex to an SDF file. More...
 
static void writeVertexesToSDF (File file, List< Vertex > vertexes, boolean append) throws DENOPTIMException
 Write a list of vertexes to file. More...
 
static void writeSDFFile (String fileName, IAtomContainer mol) throws DENOPTIMException
 Writes IAtomContainer to SDF file. More...
 
static void writeSDFFile (String fileName, List< IAtomContainer > mols) throws DENOPTIMException
 Writes IAtomContainers to SDF file. More...
 
static void writeSDFFile (String fileName, List< IAtomContainer > mols, boolean append) throws DENOPTIMException
 Writes a set of IAtomContainers to SDF file. More...
 
static void writeSDFFile (String fileName, IAtomContainer mol, boolean append) throws DENOPTIMException
 Writes an IAtomContainer to SDF file. More...
 
static void writeMol2File (String fileName, IAtomContainer mol, boolean append) throws DENOPTIMException
 
static void writeXYZFile (String fileName, IAtomContainer mol, boolean append) throws DENOPTIMException
 
static void writeSmilesSet (String fileName, String[] smiles, boolean append) throws DENOPTIMException
 Writes multiple smiles string array to the specified file. More...
 
static void writeSmiles (String fileName, String smiles, boolean append) throws DENOPTIMException
 Writes a single smiles string to the specified file. More...
 
static void writeData (String fileName, String data, boolean append) throws DENOPTIMException
 Write text-like data file. More...
 
static List< CandidateLWreadLightWeightCandidate (File file) throws DENOPTIMException
 Read only selected data from a GA produced items. More...
 
static double[] readPopulationProps (File file) throws DENOPTIMException
 Read the min, max, mean, and median of a population from FileFormat#GENSUMMARY file. More...
 
static List< String > readPopulationMemberPathnames (File file) throws DENOPTIMException
 Read the pathnames to the population members from a FileFormat#GENSUMMARY file. More...
 
static List< CandidateLWreadPopulationMembersTraces (File file) throws DENOPTIMException
 Read the minimal info that can be found in a FileFormat#GENSUMMARY file about the members of a population. More...
 
static ArrayList< String > readList (String fileName) throws DENOPTIMException
 Read list of data as text. More...
 
static ArrayList< String > readList (String fileName, boolean allowEmpty) throws DENOPTIMException
 Read list of data as text. More...
 
static String readText (String fileName) throws DENOPTIMException
 Read text from file. More...
 
static List< Map< String, Object > > readSDFProperties (String pathName, List< String > propNames) throws DENOPTIMException
 Extract selected properties from SDF files. More...
 
static String getChemDoodleString (IAtomContainer mol) throws DENOPTIMException
 Generate the ChemDoodle representation of the molecule. More...
 
static Set< APClassreadAllAPClasses (File fragLib)
 
static void writeCompatibilityMatrix (String fileName, HashMap< APClass, ArrayList< APClass > > cpMap, HashMap< APClass, APClass > capMap, HashSet< APClass > ends) throws DENOPTIMException
 The class compatibility matrix. More...
 
static void readCompatibilityMatrix (String fileName, HashMap< APClass, ArrayList< APClass > > compatMap, HashMap< APClass, APClass > cappingMap, Set< APClass > forbiddenEndList) throws DENOPTIMException
 Read the APclass compatibility matrix data from file. More...
 
static void readRCCompatibilityMatrix (String fileName, HashMap< APClass, ArrayList< APClass > > rcCompatMap) throws DENOPTIMException
 Reads the APclass compatibility matrix for ring-closing connections (the RC-CPMap). More...
 
static ArrayList< CandidatereadCandidates (File file) throws DENOPTIMException
 Reads SDF files that represent one or more tested candidates. More...
 
static ArrayList< CandidatereadCandidates (File file, boolean allowNoUID) throws DENOPTIMException
 Reads SDF files that represent one or more tested or to be tested candidates. More...
 
static void writeCandidatesToFile (File file, List< Candidate > popMembers, boolean append) throws DENOPTIMException
 Writes candidate items to file. More...
 
static void writeCandidateToFile (File file, Candidate candidate, boolean append) throws DENOPTIMException
 Writes one candidate item to file. More...
 
static ArrayList< GraphEditreadDENOPTIMGraphEditFromFile (String fileName) throws DENOPTIMException
 Reads a list of graph editing tasks from a JSON file. More...
 
static ArrayList< DGraphreadDENOPTIMGraphsFromFile (File inFile) throws Exception
 Reads a list of <DGraphs from file. More...
 
static ArrayList< DGraphreadDENOPTIMGraphsFromFile (File inFile, FileFormat format) throws Exception
 Reads a list of DGraphs from file. More...
 
static ArrayList< DGraphreadDENOPTIMGraphsFromSDFile (String fileName) throws DENOPTIMException
 Reads a list of <DGraphs from a SDF file. More...
 
static DGraph readGraphFromSDFileIAC (IAtomContainer mol) throws DENOPTIMException
 Converts an atom container read in from an SDF file into a graph, if possible. More...
 
static DGraph readGraphFromSDFileIAC (IAtomContainer mol, int molId) throws DENOPTIMException
 Converts an atom container read in from an SDF file into a graph, if possible. More...
 
static DGraph readGraphFromSDFileIAC (IAtomContainer mol, int molId, String fileName) throws DENOPTIMException
 Converts an atom container read in from an SDF file into a graph, if possible. More...
 
static ArrayList< DGraphreadDENOPTIMGraphsFromTxtFile (String fileName, FragmentSpace fragSpace, Logger logger) throws DENOPTIMException
 Reads a list of <DGraphs from a text file. More...
 
static ArrayList< VertexreadDENOPTIMVertexesFromJSONFile (String fileName) throws DENOPTIMException
 Reads a list of Vertexes from a JSON file. More...
 
static ArrayList< DGraphreadDENOPTIMGraphsFromJSONFile (String fileName) throws DENOPTIMException
 Reads a list of DGraphs from a JSON file. More...
 
static File writeGraphToFile (File file, FileFormat format, DGraph graph, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the a graph to file. More...
 
static File writeGraphsToFile (File file, FileFormat format, List< DGraph > modGraphs, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the graphs to file. More...
 
static void writeGraphsToSDF (File file, List< DGraph > graphs, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the graphs to SDF file. More...
 
static void writeGraphToSDF (File file, DGraph graph, boolean append, boolean make3D, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the graph to SDF file. More...
 
static void writeGraphToSDF (File file, DGraph graph, boolean append, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the graph to SDF file. More...
 
static void writeGraphsToSDF (File file, List< DGraph > graphs, boolean append, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the graphs to SDF file. More...
 
static void writeGraphsToSDF (File file, List< DGraph > modGraphs, boolean append, boolean make3D, Logger logger, Randomizer randomizer) throws DENOPTIMException
 Writes the graphs to SDF file. More...
 
static void writeGraphToJSON (File file, DGraph graph) throws DENOPTIMException
 Writes the graph to JSON file. More...
 
static void writeGraphsToJSON (File file, List< DGraph > modGraphs) throws DENOPTIMException
 Writes the graphs to JSON file. More...
 
static void writeGraphsToJSON (File file, List< DGraph > graphs, boolean append) throws DENOPTIMException
 Writes the graphs to JSON file. More...
 
static void writeGraphToFile (String fileName, DGraph graph, boolean append) throws DENOPTIMException
 Writes the string representation of a graph to file. More...
 
static Map< File, FileFormatreadRecentFilesMap ()
 Reads the file defined in DENOPTIMConstants#RECENTFILESLIST and makes a map that contains the pathname and the format of each recent file. More...
 
static ArrayList< VertexreadVertexes (File file, Vertex.BBType bbt) throws UndetectedFileFormatException, IOException, IllegalArgumentException, DENOPTIMException
 Reads Vertexes from any file that can contain such items. More...
 
static ArrayList< VertexreadDENOPTIMVertexesFromSDFile (String fileName, Vertex.BBType bbt) throws DENOPTIMException
 Reads a list of Vertexes from a SDF file. More...
 
static LinkedHashMap< String, String > readCSDFormulae (File file) throws DENOPTIMException
 Read molecular formula from TXT data representation produced by Cambridge Structural Database tools (such as Conquest). More...
 
static void readCuttingRules (BufferedReader reader, List< CuttingRule > cutRules, String source) throws DENOPTIMException
 Read cutting rules from a stream. More...
 
static void readCuttingRules (File file, List< CuttingRule > cutRules) throws DENOPTIMException
 Read cutting rules from a properly formatted text file. More...
 
static void readCuttingRules (ArrayList< String > cutRulLines, List< CuttingRule > cutRules, String source) throws DENOPTIMException
 Read cutting rules from a properly formatted text file. More...
 
static void writeCuttingRules (File file, List< CuttingRule > cutRules) throws DENOPTIMException
 Writes a formatted text file that collects cutting rule. More...
 
static void appendTxtFiles (File f1, List< File > files) throws IOException
 Appends the second file to the first. More...
 

Static Public Attributes

static final String FS = System.getProperty("file.separator")
 File separator from system. More...
 
static final String NL = System.getProperty("line.separator")
 Newline character from system. More...
 

Static Private Attributes

static final IChemObjectBuilder builder
 

Detailed Description

Utility methods for input/output.

Author
Vishwesh Venkatraman
Marco Foscato

Definition at line 112 of file DenoptimIO.java.

Member Function Documentation

◆ appendTxtFiles()

static void denoptim.io.DenoptimIO.appendTxtFiles ( File  f1,
List< File >  files 
) throws IOException
static

Appends the second file to the first.

Parameters
f1file being elongated
listfiles providing the content to place in f1.
Exceptions
IOException

Definition at line 2564 of file DenoptimIO.java.

Referenced by denoptim.fragmenter.ParallelFragmentationAlgorithm.doPostFlightOperations().

Here is the caller graph for this function:

◆ getChemDoodleString()

static String denoptim.io.DenoptimIO.getChemDoodleString ( IAtomContainer  mol) throws DENOPTIMException
static

Generate the ChemDoodle representation of the molecule.

Parameters
mol
Returns
molecule as a formatted string
Exceptions
DENOPTIMException

Definition at line 1077 of file DenoptimIO.java.

◆ readAllAPClasses()

static Set< APClass > denoptim.io.DenoptimIO.readAllAPClasses ( File  fragLib)
static

Definition at line 1114 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readVertexes(), and denoptim.graph.Vertex.BBType.UNDEFINED.

Referenced by denoptim.gui.CompatibilityMatrixForm.importAllAPClassesFromCappingGroupLibs(), denoptim.gui.CompatibilityMatrixForm.importAllAPClassesFromFragmentLibs(), and denoptim.io.DenoptimIOTest.testReadAllAPClasses().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readAllAtomContainers()

static List< IAtomContainer > denoptim.io.DenoptimIO.readAllAtomContainers ( File  file) throws IOException, CDKException
static

Returns a single collection with all atom containers found in a file of any format.

CIF files are internally converted to SDF files, causing loss of information beyond molecular structure in Cartesian coordinates. So, if you need more than molecular structure from CIF files, do not use this method.

Parameters
filethe file to read.
Returns
the list of containers found in the file.
Exceptions
IOExceptionif the file is not found or not readable.
CDKExceptionif the reading of the file goes wrong.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 282 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.FS, denoptim.files.FileUtils.getTempFolder(), and denoptim.io.DenoptimIO.readAllAtomContainers().

Referenced by denoptim.gui.MoleculeViewPanel.fillDataTable(), denoptim.gui.FragmentViewPanel.getStructureFromJmolViewer(), denoptim.gui.GUIVertexInspector.importStructureFromFile(), denoptim.io.IteratingAtomContainerReader.IteratingAtomContainerReader(), denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile(), denoptim.fitness.FitnessExpressionParser.makeIBitFingerprint(), denoptim.io.DenoptimIO.readAllAtomContainers(), denoptim.task.FitnessTask.runExternalFitness(), denoptim.gui.MoleculeViewPanel.showPopup(), and denoptim.io.DenoptimIOTest.testReadAllAtomContainersFromCIF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readCandidates() [1/2]

static ArrayList< Candidate > denoptim.io.DenoptimIO.readCandidates ( File  file) throws DENOPTIMException
static

Reads SDF files that represent one or more tested candidates.

Candidates are provided with a graph representation, a unique identifier, and either a fitness value or a mol_error defining why this candidate could not be evaluated.

Parameters
filethe SDF file to read.
Returns
the list of candidates.
Exceptions
DENOPTIMExceptionis something goes wrong while reading the file or interpreting its content

Definition at line 1378 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readCandidates().

Referenced by denoptim.ga.EAUtils.getPopulationFromFile(), denoptim.gui.MoleculeViewPanel.loadChemicalStructureFromFile(), denoptim.io.DenoptimIO.readCandidates(), denoptim.io.DenoptimIO.readDENOPTIMData(), denoptim.io.DenoptimIO.readGenerationFromSummary(), and denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readCandidates() [2/2]

static ArrayList< Candidate > denoptim.io.DenoptimIO.readCandidates ( File  file,
boolean  allowNoUID 
) throws DENOPTIMException
static

Reads SDF files that represent one or more tested or to be tested candidates.

Parameters
filethe SDF file to read.
allowNoUIDuse true if candidates should be allowed to have no unique identifier.
Returns
the list of candidates.
Exceptions
DENOPTIMExceptionis something goes wrong while reading the file or interpreting its content

Definition at line 1397 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.GAGENDIRNAMEROOT, denoptim.io.DenoptimIO.readSDFFile(), denoptim.graph.Candidate.setGeneration(), and denoptim.graph.Candidate.setSDFFile().

Here is the call graph for this function:

◆ readCompatibilityMatrix()

static void denoptim.io.DenoptimIO.readCompatibilityMatrix ( String  fileName,
HashMap< APClass, ArrayList< APClass > >  compatMap,
HashMap< APClass, APClass cappingMap,
Set< APClass forbiddenEndList 
) throws DENOPTIMException
static

Read the APclass compatibility matrix data from file.

Parameters
fileNamethe file to be read
compatMapcontainer for the APClass compatibility rules
cappingMapcontainer for the capping rules
forbiddenEndListcontainer for the definition of forbidden ends
Exceptions
DENOPTIMException

Definition at line 1205 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.APCMAPCAPPING, denoptim.constants.DENOPTIMConstants.APCMAPCOMPRULE, denoptim.constants.DENOPTIMConstants.APCMAPFORBIDDENEND, denoptim.constants.DENOPTIMConstants.APCMAPIGNORE, and denoptim.graph.APClass.make().

Referenced by denoptim.fragspace.FragmentSpace.FragmentSpace(), denoptim.fragspace.FragmentSpace.importCompatibilityMatrixFromFile(), and denoptim.gui.CompatibilityMatrixForm.importCPMapFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readCSDFormulae()

static LinkedHashMap< String, String > denoptim.io.DenoptimIO.readCSDFormulae ( File  file) throws DENOPTIMException
static

Read molecular formula from TXT data representation produced by Cambridge Structural Database tools (such as Conquest).

Essentially, this method reads a text file expecting to find lines as the following among lines with other kinds of information:

REFCODE: ABEWOT
[...]
Formula:           C36 H44 Cl1 P2 Ru1 1+,F6 P1 1-
Parameters
filethe text file to read
Returns
the mapping of CSD's REFCODE as key to their respective molecular formula as formatted in the input.
Exceptions
DENOPTIMExceptionif any exception occurs during the reading of the file or if the file does not exist.

Definition at line 2341 of file DenoptimIO.java.

Referenced by denoptim.programs.fragmenter.FragmenterParameters.processParameters(), and denoptim.io.DenoptimIOTest.testReadCSDFormulae().

Here is the caller graph for this function:

◆ readCuttingRules() [1/3]

static void denoptim.io.DenoptimIO.readCuttingRules ( ArrayList< String >  cutRulLines,
List< CuttingRule cutRules,
String  source 
) throws DENOPTIMException
static

Read cutting rules from a properly formatted text file.

Parameters
cutRulLinestext lines containing cutting rules. These are expected to be lines starting with the DENOPTIMConstants.CUTRULKEYWORD keyword.
cutRulesthe collector of the cutting rules. The collection is already sorted by priority when this method returns.
sourcethe source of text. This is used only in logging as the source of the text that we are trying to convert into cutting rules. For example, a file name.
Exceptions
DENOPTIMExceptionin case there are errors in the formatting of the text contained in the file.

Definition at line 2468 of file DenoptimIO.java.

References denoptim.programs.fragmenter.CuttingRule.getPriority().

Here is the call graph for this function:

◆ readCuttingRules() [2/3]

static void denoptim.io.DenoptimIO.readCuttingRules ( BufferedReader  reader,
List< CuttingRule cutRules,
String  source 
) throws DENOPTIMException
static

Read cutting rules from a stream.

Parameters
readerthe stream providing text lines.
cutRulesthe collector of the cutting rules. The collection is already sorted by priority when this method returns.
sourcethe source of text. This is used only in logging as the source of the text that we are trying to convert into cutting rules. For example, a file name.
Exceptions
DENOPTIMExceptionin case there are errors in the formatting of the text contained in the file.

Definition at line 2399 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.CUTRULKEYWORD, and denoptim.io.DenoptimIO.readCuttingRules().

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog(), denoptim.gui.GUIVertexInspector.dialogToDefineCuttingRules(), denoptim.programs.fragmenter.FragmenterParameters.processParameters(), denoptim.io.DenoptimIO.readCuttingRules(), denoptim.io.DenoptimIOTest.testIOCuttingRules(), and denoptim.io.DenoptimIOTest.testReadCuttingRulsedDefault().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readCuttingRules() [3/3]

static void denoptim.io.DenoptimIO.readCuttingRules ( File  file,
List< CuttingRule cutRules 
) throws DENOPTIMException
static

Read cutting rules from a properly formatted text file.

Parameters
filethe file to read.
cutRulesthe collector of the cutting rules. The collection is already sorted by priority when this method returns.
Exceptions
DENOPTIMExceptionin case there are errors in the formatting of the text contained in the file.

Definition at line 2437 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.CUTRULKEYWORD, denoptim.io.DenoptimIO.readCuttingRules(), and denoptim.io.DenoptimIO.readList().

Here is the call graph for this function:

◆ readDENOPTIMData()

static Object denoptim.io.DenoptimIO.readDENOPTIMData ( String  pathname) throws Exception
static

Reads any content of a given pathname and tries to read DENOPTIM data from it.

As the type of the returned value if not defined this method is meant of untyped coding context, like the interfacing with Python. Please, avoid to use it in typed code context, like within JAVA code.

Parameters
pathnamethe pathname to read.
Returns
any DENOPTIM-like data that could be found in the given pathname.
Exceptions
Exceptionif for any reason no data can be returned.

Definition at line 139 of file DenoptimIO.java.

References denoptim.files.FileUtils.detectFileFormat(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.io.DenoptimIO.readCandidates(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.io.DenoptimIO.readGenerationFromSummary(), denoptim.io.DenoptimIO.readVertexes(), and denoptim.files.FileFormat.UNRECOGNIZED.

Referenced by denoptim.integration.python.Py4JGetawayServer.loadData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readDENOPTIMGraphEditFromFile()

static ArrayList< GraphEdit > denoptim.io.DenoptimIO.readDENOPTIMGraphEditFromFile ( String  fileName) throws DENOPTIMException
static

Reads a list of graph editing tasks from a JSON file.

Parameters
fileNamethe pathname of the file to read
Returns
the list of editing tasks
Exceptions
DENOPTIMException

Definition at line 1481 of file DenoptimIO.java.

References denoptim.json.DENOPTIMgson.getReader().

Referenced by denoptim.programs.grapheditor.GraphEdParameters.processParameters().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readDENOPTIMGraphsFromFile() [1/2]

static ArrayList< DGraph > denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile ( File  inFile) throws Exception
static

Reads a list of <DGraphs from file.

Parameters
fileNamethe pathname of the file to read
Returns
the list of graphs
Exceptions
Exception

Definition at line 1551 of file DenoptimIO.java.

References denoptim.files.FileUtils.detectFileFormat(), and denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile().

Referenced by denoptim.programs.combinatorial.CEBLParameters.processParameters(), denoptim.programs.graphlisthandler.GraphListsHandlerParameters.processParameters(), denoptim.ga.EAUtils.readCandidateFromFile(), denoptim.io.DenoptimIO.readDENOPTIMData(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.gui.GUIGraphHandler.readGraphsFromFile(), denoptim.programs.grapheditor.GraphEdParameters.readInputGraphs(), denoptim.programs.fitnessevaluator.FPRunner.run(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.isomorphism.Isomorphism.runProgram(), and denoptim.programs.genetweeker.GeneOpsRunner.runXOver().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readDENOPTIMGraphsFromFile() [2/2]

static ArrayList< DGraph > denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile ( File  inFile,
FileFormat  format 
) throws Exception
static

Reads a list of DGraphs from file.

Parameters
inFilethe file to read
formatthe format of the file to read. We assume this has been detected from previous calls of FileUtils#detectFileFormat(File) and that now we want to avoid having to call that method again.
Returns
the list of graphs
Exceptions
Exception

Definition at line 1571 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.GRAPHTAG, denoptim.io.DenoptimIO.readDENOPTIMGraphsFromJSONFile(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromSDFile(), denoptim.io.DenoptimIO.readVertexes(), denoptim.graph.Vertex.BBType.UNDEFINED, and denoptim.files.FileFormat.VRTXSDF.

Here is the call graph for this function:

◆ readDENOPTIMGraphsFromJSONFile()

static ArrayList< DGraph > denoptim.io.DenoptimIO.readDENOPTIMGraphsFromJSONFile ( String  fileName) throws DENOPTIMException
static

Reads a list of DGraphs from a JSON file.

Parameters
fileNamethe pathname of the file to read
Returns
the list of graphs
Exceptions
DENOPTIMException

Definition at line 1875 of file DenoptimIO.java.

References denoptim.graph.DGraph.fromJson(), and denoptim.json.DENOPTIMgson.getReader().

Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.gui.GUIGraphHandler.readGraphsFromFile(), denoptim.io.DenoptimIO.readVertexes(), and denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readDENOPTIMGraphsFromSDFile()

static ArrayList< DGraph > denoptim.io.DenoptimIO.readDENOPTIMGraphsFromSDFile ( String  fileName) throws DENOPTIMException
static

Reads a list of <DGraphs from a SDF file.

Parameters
fileNamethe pathname of the file to read.
Returns
the list of graphs
Exceptions
DENOPTIMException

Definition at line 1626 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readGraphFromSDFileIAC(), and denoptim.io.DenoptimIO.readSDFFile().

Referenced by denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.gui.GUIGraphHandler.readGraphsFromFile(), and denoptim.io.DenoptimIO.readVertexes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readDENOPTIMGraphsFromTxtFile()

static ArrayList< DGraph > denoptim.io.DenoptimIO.readDENOPTIMGraphsFromTxtFile ( String  fileName,
FragmentSpace  fragSpace,
Logger  logger 
) throws DENOPTIMException
static

Reads a list of <DGraphs from a text file.

Parameters
fileNamethe pathname of the file to read.
Returns
the list of graphs.
Exceptions
DENOPTIMException

Definition at line 1752 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.APCMAPIGNORE, and denoptim.utils.GraphConversionTool.getGraphFromString().

Here is the call graph for this function:

◆ readDENOPTIMVertexesFromJSONFile()

static ArrayList< Vertex > denoptim.io.DenoptimIO.readDENOPTIMVertexesFromJSONFile ( String  fileName) throws DENOPTIMException
static

Reads a list of Vertexes from a JSON file.

Parameters
fileNamethe pathname of the file to read.
Returns
the list of vertexes.
Exceptions
DENOPTIMException

Definition at line 1809 of file DenoptimIO.java.

References denoptim.graph.Vertex.fromJson(), and denoptim.json.DENOPTIMgson.getReader().

Referenced by denoptim.io.DenoptimIO.readVertexes(), denoptim.io.DenoptimIOTest.testAppendToJSON(), and denoptim.io.DenoptimIO.writeVertexesToJSON().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readDENOPTIMVertexesFromSDFile()

static ArrayList< Vertex > denoptim.io.DenoptimIO.readDENOPTIMVertexesFromSDFile ( String  fileName,
Vertex.BBType  bbt 
) throws DENOPTIMException
static

Reads a list of Vertexes from a SDF file.

Parameters
fileNamethe pathname of the file to read.
Returns
the list of vertexes.
Exceptions
DENOPTIMException

Definition at line 2300 of file DenoptimIO.java.

References denoptim.json.DENOPTIMgson.getReader(), denoptim.graph.Vertex.parseVertexFromSDFFormat(), and denoptim.io.DenoptimIO.readSDFFile().

Referenced by denoptim.io.DenoptimIO.readVertexes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readGenerationFromSummary()

static List< Candidate > denoptim.io.DenoptimIO.readGenerationFromSummary ( File  file) throws DENOPTIMException
static

Reads a FileFormat#GENSUMMARY file and searches all the files defining each member of the population.

If the pathnames found in FileFormat#GENSUMMARY do not exist, this method will try to build the candidate's files pathnames relative to the location of the FileFormat#GENSUMMARY. This assumes that the original folder structure of a FileFormat#GA_RUN has been preserved.

Parameters
filethe generation summary file (FileFormat#GENSUMMARY) to read
Returns
population members
Exceptions
DENOPTIMException

Definition at line 237 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readCandidates(), and denoptim.io.DenoptimIO.readPopulationMemberPathnames().

Referenced by denoptim.io.DenoptimIO.readDENOPTIMData(), and denoptim.io.DenoptimIOTest.testReadGenerationFromSummary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readGraphFromSDFileIAC() [1/3]

static DGraph denoptim.io.DenoptimIO.readGraphFromSDFileIAC ( IAtomContainer  mol) throws DENOPTIMException
static

Converts an atom container read in from an SDF file into a graph, if possible.

Otherwise, throws an exception.

Parameters
molthe atom container coming from SDF representation
molIdidentified used only for logging purposed
Returns
the corresponding graph or null.
Exceptions
DENOPTIMExceptionis the atom container cannot be converted due to lack of the proper SDF tags, or failure in the conversion.

Definition at line 1652 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readGraphFromSDFileIAC().

Referenced by denoptim.graph.Candidate.Candidate(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromSDFile(), and denoptim.io.DenoptimIO.readGraphFromSDFileIAC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readGraphFromSDFileIAC() [2/3]

static DGraph denoptim.io.DenoptimIO.readGraphFromSDFileIAC ( IAtomContainer  mol,
int  molId 
) throws DENOPTIMException
static

Converts an atom container read in from an SDF file into a graph, if possible.

Otherwise, throws an exception.

Parameters
molthe atom container coming from SDF representation
molIdidentified used only for logging purposed
Returns
the corresponding graph or null.
Exceptions
DENOPTIMExceptionis the atom container cannot be converted due to lack of the proper SDF tags, or failure in the conversion.

Definition at line 1669 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readGraphFromSDFileIAC().

Here is the call graph for this function:

◆ readGraphFromSDFileIAC() [3/3]

static DGraph denoptim.io.DenoptimIO.readGraphFromSDFileIAC ( IAtomContainer  mol,
int  molId,
String  fileName 
) throws DENOPTIMException
static

Converts an atom container read in from an SDF file into a graph, if possible.

Otherwise, throws an exception.

Parameters
molthe atom container coming from SDF representation
molIdidentified used only for logging purposes. If negative it is ignored.
fileNamea pathname used only for logging errors. This is usually the pathname to the file from which we took the atom container. If empty it is ignored
Returns
the corresponding graph or null.
Exceptions
DENOPTIMExceptionis the atom container cannot be converted due to lack of the proper SDF tags, or failure in the conversion.

Definition at line 1690 of file DenoptimIO.java.

References denoptim.graph.DGraph.fromJson(), denoptim.constants.DENOPTIMConstants.GRAPHJSONTAG, and denoptim.constants.DENOPTIMConstants.GRAPHTAG.

Here is the call graph for this function:

◆ readLightWeightCandidate()

static List< CandidateLW > denoptim.io.DenoptimIO.readLightWeightCandidate ( File  file) throws DENOPTIMException
static

Read only selected data from a GA produced items.

This is a light-weight reader of SDF files containing an item, which can be successfully or Unsuccessfully evaluated.

Parameters
fileNamethe pathname to SDF file
Returns
the light-weight item description.
Exceptions
DENOPTIMException

Definition at line 769 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.FITNESSTAG, denoptim.constants.DENOPTIMConstants.GRAPHLEVELTAG, denoptim.constants.DENOPTIMConstants.MOLERRORTAG, denoptim.constants.DENOPTIMConstants.PROVENANCE, denoptim.io.DenoptimIO.readSDFProperties(), denoptim.graph.CandidateLW.setError(), denoptim.graph.CandidateLW.setFitness(), denoptim.graph.CandidateLW.setGeneratingSource(), denoptim.graph.CandidateLW.setLevel(), and denoptim.constants.DENOPTIMConstants.UNIQUEIDTAG.

Referenced by denoptim.gui.GUIInspectFSERun.importFSERunData(), denoptim.gui.GUIInspectGARun.readOneGeneration(), and denoptim.io.DenoptimIOTest.testReadLightWeightCandidate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readList() [1/2]

static ArrayList< String > denoptim.io.DenoptimIO.readList ( String  fileName) throws DENOPTIMException
static

◆ readList() [2/2]

static ArrayList< String > denoptim.io.DenoptimIO.readList ( String  fileName,
boolean  allowEmpty 
) throws DENOPTIMException
static

Read list of data as text.

Parameters
fileNamethe pathname to the file to read.
allowEmptyif true the method is allowed to return an empty list if the file exists and is empty
Returns
list of data
Exceptions
DENOPTIMException

Definition at line 976 of file DenoptimIO.java.

◆ readPopulationMemberPathnames()

static List< String > denoptim.io.DenoptimIO.readPopulationMemberPathnames ( File  file) throws DENOPTIMException
static

Read the pathnames to the population members from a FileFormat#GENSUMMARY file.

Parameters
fileNamethe pathname to the file to read.
Returns
list of data
Exceptions
DENOPTIMException

Definition at line 885 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.FS, and denoptim.io.DenoptimIO.readList().

Referenced by denoptim.io.DenoptimIO.readGenerationFromSummary(), and denoptim.gui.GUIInspectGARun.readOneGeneration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPopulationMembersTraces()

static List< CandidateLW > denoptim.io.DenoptimIO.readPopulationMembersTraces ( File  file) throws DENOPTIMException
static

Read the minimal info that can be found in a FileFormat#GENSUMMARY file about the members of a population.

Parameters
fileNamethe pathname to the FileFormat#GENSUMMARY file to read.
Returns
list of population members defined to the extent that information is available in the FileFormat#GENSUMMARY file.
Exceptions
DENOPTIMExceptionif the file cannot be read.

Definition at line 918 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readList(), and denoptim.graph.CandidateLW.setFitness().

Referenced by denoptim.gui.GUIInspectGARun.readOneGeneration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPopulationProps()

static double[] denoptim.io.DenoptimIO.readPopulationProps ( File  file) throws DENOPTIMException
static

Read the min, max, mean, and median of a population from FileFormat#GENSUMMARY file.

Parameters
fileNamethe pathname to the file to read.
Returns
list of data
Exceptions
DENOPTIMException

Definition at line 844 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readList().

Referenced by denoptim.gui.GUIInspectGARun.readOneGeneration().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRCCompatibilityMatrix()

static void denoptim.io.DenoptimIO.readRCCompatibilityMatrix ( String  fileName,
HashMap< APClass, ArrayList< APClass > >  rcCompatMap 
) throws DENOPTIMException
static

Reads the APclass compatibility matrix for ring-closing connections (the RC-CPMap).

Note that RC-CPMap is by definition symmetric. Though, true entries can be defined either from X:Y or Y:X, and we make sure such entries are stored in the map. This method assumes that the APclasses reported in the RC-CPMap are defined, w.r.t bond order, in the regular compatibility matrix as we wont check it this condition is satisfied.

Parameters
fileName
rcCompatMap
Exceptions
DENOPTIMException

Definition at line 1299 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.APCMAPCOMPRULE, denoptim.constants.DENOPTIMConstants.APCMAPIGNORE, and denoptim.graph.APClass.make().

Referenced by denoptim.fragspace.FragmentSpace.FragmentSpace(), and denoptim.fragspace.FragmentSpace.importRCCompatibilityMatrixFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readRecentFilesMap()

static Map< File, FileFormat > denoptim.io.DenoptimIO.readRecentFilesMap ( )
static

Reads the file defined in DENOPTIMConstants#RECENTFILESLIST and makes a map that contains the pathname and the format of each recent file.

Ignores any entry that is present in the file but cannot be found in the system.

Returns
the recent files map

Definition at line 2189 of file DenoptimIO.java.

References denoptim.logging.StaticLogger.appLogger, denoptim.files.FileUtils.checkExists(), denoptim.io.DenoptimIO.readList(), and denoptim.constants.DENOPTIMConstants.RECENTFILESLIST.

Referenced by denoptim.files.FileUtils.addToRecentFiles(), and denoptim.gui.MainToolBar.updateOpenRecentMenu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readSDFFile()

static ArrayList< IAtomContainer > denoptim.io.DenoptimIO.readSDFFile ( String  fileName) throws DENOPTIMException
static

Reads a file containing multiple molecules (multiple SD format))

Parameters
fileNamethe file containing the molecules
Returns
IAtomContainer[] an array of molecules
Exceptions
DENOPTIMException

Definition at line 347 of file DenoptimIO.java.

Referenced by denoptim.gui.GUIGraphHandler.appendGraphsFromFile(), denoptim.gui.GUIGraphHandler.importGraphsFromFile(), denoptim.io.DenoptimIO.readCandidates(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromSDFile(), denoptim.io.DenoptimIO.readDENOPTIMVertexesFromSDFile(), denoptim.io.DenoptimIO.readSDFProperties(), denoptim.programs.fitnessevaluator.FPRunner.run(), denoptim.graph.TemplateTest.testGetIAtomContainer(), denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex(), and denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol().

Here is the caller graph for this function:

◆ readSDFProperties()

static List< Map< String, Object > > denoptim.io.DenoptimIO.readSDFProperties ( String  pathName,
List< String >  propNames 
) throws DENOPTIMException
static

Extract selected properties from SDF files.

Parameters
pathNameto the file to read
propNamesthe list of property names to extract. All the rest will be ignored.
Returns
a corresponding map of results.
Exceptions
DENOPTIMExceptionif the file cannot be read.

Definition at line 1051 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.readSDFFile().

Referenced by denoptim.io.DenoptimIO.readLightWeightCandidate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readText()

static String denoptim.io.DenoptimIO.readText ( String  fileName) throws DENOPTIMException
static

Read text from file.

Parameters
fileNamethe pathname to the file to read.
Returns
the text.
Exceptions
DENOPTIMException

Definition at line 1017 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.NL.

Referenced by denoptim.combinatorial.CEBLUtils.deserializeCheckpoint(), denoptim.gui.GUITextReader.displayContent(), and denoptim.programs.fitnessevaluator.FPRunner.run().

Here is the caller graph for this function:

◆ readVertexes()

static ArrayList< Vertex > denoptim.io.DenoptimIO.readVertexes ( File  file,
Vertex.BBType  bbt 
) throws UndetectedFileFormatException, IOException, IllegalArgumentException, DENOPTIMException
static

Reads Vertexes from any file that can contain such items.

Parameters
filethe file we want to read.
bbtthe type of building blocks assigned to each new vertex, if not already specified by the content of the file, i.e., this method does not overwrite the Vertex.BBType defined in the file.
Exceptions
IOException
UndetectedFileFormatException
DENOPTIMException
IllegalArgumentException
Exception

Definition at line 2243 of file DenoptimIO.java.

References denoptim.files.FileUtils.detectFileFormat(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromJSONFile(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromSDFile(), denoptim.io.DenoptimIO.readDENOPTIMVertexesFromJSONFile(), denoptim.io.DenoptimIO.readDENOPTIMVertexesFromSDFile(), and denoptim.graph.Template.setInnerGraph().

Referenced by denoptim.fragmenter.ParallelConformerExtractionAlgorithm.createAndSubmitTasks(), denoptim.fragspace.FragmentSpace.FragmentSpace(), denoptim.gui.GUIVertexInspector.importVerticesFromFile(), denoptim.gui.GUIVertexInspector.initialize(), denoptim.fragmenter.FragmenterTools.manageFragmentCollection(), denoptim.programs.fragmenter.FragmenterParameters.processParameters(), denoptim.io.DenoptimIO.readAllAPClasses(), denoptim.io.DenoptimIO.readDENOPTIMData(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromFile(), denoptim.programs.fragmenter.Fragmenter.runProgram(), denoptim.io.DenoptimIOTest.testIOEmptyVertex(), denoptim.io.DenoptimIOTest.testIOMolFragment(), and denoptim.io.DenoptimIOTest.testIOTemplate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCandidatesToFile()

static void denoptim.io.DenoptimIO.writeCandidatesToFile ( File  file,
List< Candidate popMembers,
boolean  append 
) throws DENOPTIMException
static

Writes candidate items to file.

Always overwrites.

Parameters
filethe file where to print.
popMembersthe list of candidates to print to file.
appenduse true to append if the file exist
Exceptions
DENOPTIMException

Definition at line 1433 of file DenoptimIO.java.

References denoptim.files.FileFormat.CANDIDATESDF, and denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.ga.EAUtils.outputPopulationDetails().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCandidateToFile()

static void denoptim.io.DenoptimIO.writeCandidateToFile ( File  file,
Candidate  candidate,
boolean  append 
) throws DENOPTIMException
static

Writes one candidate item to file.

Always overwrites.

Parameters
filethe file where to print.
candidatethe candidate to print to file.
appenduse true to append if the file exist
Exceptions
DENOPTIMException

Definition at line 1459 of file DenoptimIO.java.

References denoptim.files.FileFormat.CANDIDATESDF, and denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.ga.EAUtils.getPopulationFromFile(), denoptim.ga.EAUtils.outputFinalResults(), denoptim.task.FitnessTask.runFitnessProvider(), and denoptim.io.DenoptimIOTest.testReadGenerationFromSummary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCompatibilityMatrix()

static void denoptim.io.DenoptimIO.writeCompatibilityMatrix ( String  fileName,
HashMap< APClass, ArrayList< APClass > >  cpMap,
HashMap< APClass, APClass capMap,
HashSet< APClass ends 
) throws DENOPTIMException
static

The class compatibility matrix.

Parameters
fileNamethe file to be read
cpMapcontainer for the APClass compatibility rules
capMapcontainer for the capping rules
endscontainer for the definition of forbidden ends

Definition at line 1142 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.APCMAPCAPPING, denoptim.constants.DENOPTIMConstants.APCMAPCOMPRULE, denoptim.constants.DENOPTIMConstants.APCMAPFORBIDDENEND, denoptim.constants.DENOPTIMConstants.APCMAPIGNORE, denoptim.io.DenoptimIO.NL, and denoptim.io.DenoptimIO.writeData().

Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), and denoptim.gui.CompatibilityMatrixForm.writeCopatibilityMatrixFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCuttingRules()

static void denoptim.io.DenoptimIO.writeCuttingRules ( File  file,
List< CuttingRule cutRules 
) throws DENOPTIMException
static

Writes a formatted text file that collects cutting rule.

Parameters
filethe file where to write.
cutRulesthe cutting rules to write.
Exceptions
DENOPTIMException

Definition at line 2534 of file DenoptimIO.java.

References denoptim.constants.DENOPTIMConstants.CUTRULKEYWORD, denoptim.io.DenoptimIO.NL, and denoptim.io.DenoptimIO.writeData().

Referenced by denoptim.gui.CuttingRulesSelectionDialog.CuttingRulesSelectionDialog(), and denoptim.io.DenoptimIOTest.testIOCuttingRules().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeData()

static void denoptim.io.DenoptimIO.writeData ( String  fileName,
String  data,
boolean  append 
) throws DENOPTIMException
static

Write text-like data file.

Parameters
fileName
data
append
Exceptions
DENOPTIMException

Definition at line 738 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.NL.

Referenced by denoptim.utils.SizeControlledSet.addNewUniqueEntry(), denoptim.files.FileUtils.addToRecentFiles(), denoptim.files.FileUtils.canWriteAndReadTo(), denoptim.integration.tinker.ConformationalSearchPSSROT.fixLongeLinesInXYZ(), denoptim.gui.FragmentViewPanel.getStructureFromJmolViewer(), denoptim.ga.EAUtils.outputPopulationDetails(), denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT(), denoptim.utils.Randomizer.print(), denoptim.task.ProgramTask.printErrorToFile(), denoptim.logging.Monitor.printHeader(), denoptim.logging.Monitor.printSnapshot(), denoptim.logging.Monitor.printSummary(), denoptim.programs.fitnessevaluator.FPRunner.run(), denoptim.combinatorial.CEBLUtils.serializeCheckPoint(), denoptim.main.MainTest.testDefineProgramBehavior(), denoptim.io.DenoptimIOTest.testDetectFileFormat(), denoptim.graph.TemplateTest.testGetIAtomContainer(), denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol(), denoptim.io.DenoptimIOTest.testReadAllAtomContainersFromCIF(), denoptim.io.DenoptimIOTest.testReadCSDFormulae(), denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs(), denoptim.fragmenter.ParallelFragmentationAlgorithmTest.testSplitInputForThreads(), denoptim.io.DenoptimIO.writeCompatibilityMatrix(), denoptim.io.DenoptimIO.writeCuttingRules(), denoptim.files.SingletonFileAccess.writeData(), denoptim.io.DenoptimIO.writeGraphsToJSON(), denoptim.io.DenoptimIO.writeGraphToFile(), denoptim.ga.EAUtils.writeUID(), and denoptim.io.DenoptimIO.writeVertexesToJSON().

Here is the caller graph for this function:

◆ writeGraphsToFile()

static File denoptim.io.DenoptimIO.writeGraphsToFile ( File  file,
FileFormat  format,
List< DGraph modGraphs,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the graphs to file.

Always overwrites.

Parameters
filethe file where to print
formathow to print graphs on file
modGraphsthe list of graphs to print
Returns
the reference to the file written.
Exceptions
DENOPTIMException

Definition at line 1979 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphsToJSON(), and denoptim.io.DenoptimIO.writeGraphsToSDF().

Referenced by denoptim.gui.GUIGraphHandler.initialize(), and denoptim.programs.grapheditor.GraphEditor.runProgram().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeGraphsToJSON() [1/2]

static void denoptim.io.DenoptimIO.writeGraphsToJSON ( File  file,
List< DGraph graphs,
boolean  append 
) throws DENOPTIMException
static

Writes the graphs to JSON file.

Parameters
filethe file where to print
graphsthe list of graphs to print
appenduse true to append
Exceptions
DENOPTIMException

Definition at line 2157 of file DenoptimIO.java.

References denoptim.json.DENOPTIMgson.getWriter(), and denoptim.io.DenoptimIO.writeData().

Here is the call graph for this function:

◆ writeGraphsToJSON() [2/2]

static void denoptim.io.DenoptimIO.writeGraphsToJSON ( File  file,
List< DGraph modGraphs 
) throws DENOPTIMException
static

Writes the graphs to JSON file.

Parameters
filethe file where to print
modGraphsthe list of graphs to print
Exceptions
DENOPTIMException

Definition at line 2140 of file DenoptimIO.java.

References denoptim.json.DENOPTIMgson.getWriter(), and denoptim.io.DenoptimIO.writeData().

Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.io.DenoptimIO.writeGraphsToFile(), and denoptim.io.DenoptimIO.writeGraphToJSON().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeGraphsToSDF() [1/3]

static void denoptim.io.DenoptimIO.writeGraphsToSDF ( File  file,
List< DGraph graphs,
boolean  append,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the graphs to SDF file.

Parameters
filethe file where to print
graphsthe list of graphs to print
appenduse true to append to the file
Exceptions
DENOPTIMException

Definition at line 2069 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphsToSDF().

Here is the call graph for this function:

◆ writeGraphsToSDF() [2/3]

static void denoptim.io.DenoptimIO.writeGraphsToSDF ( File  file,
List< DGraph graphs,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the graphs to SDF file.

Parameters
filethe file where to print
graphsthe list of graphs to print
Exceptions
DENOPTIMException

Definition at line 2013 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphsToSDF().

Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.io.DenoptimIO.writeGraphsToFile(), denoptim.io.DenoptimIO.writeGraphsToSDF(), and denoptim.io.DenoptimIO.writeGraphToSDF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeGraphsToSDF() [3/3]

static void denoptim.io.DenoptimIO.writeGraphsToSDF ( File  file,
List< DGraph modGraphs,
boolean  append,
boolean  make3D,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the graphs to SDF file.

Parameters
filethe file where to print
modGraphsthe list of graphs to print
appenduse true to append to the file
make3Duse true to convert graph to 3d. If false an empty molecule will be used.
Exceptions
DENOPTIMException

Definition at line 2088 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.builder, denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.utils.GraphUtils.writeSDFFields(), and denoptim.io.DenoptimIO.writeSDFFile().

Here is the call graph for this function:

◆ writeGraphToFile() [1/2]

static File denoptim.io.DenoptimIO.writeGraphToFile ( File  file,
FileFormat  format,
DGraph  graph,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the a graph to file.

Always overwrites.

Parameters
filethe file where to print.
formathow to print graphs on file.
graphthe graph to print.
Exceptions
DENOPTIMException

Definition at line 1943 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphToJSON(), and denoptim.io.DenoptimIO.writeGraphToSDF().

Here is the call graph for this function:

◆ writeGraphToFile() [2/2]

static void denoptim.io.DenoptimIO.writeGraphToFile ( String  fileName,
DGraph  graph,
boolean  append 
) throws DENOPTIMException
static

Writes the string representation of a graph to file.

Parameters
fileNamethe file where to print
graphthe graph to print
appenduse true to append
Exceptions
DENOPTIMException

Definition at line 2174 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeData().

Here is the call graph for this function:

◆ writeGraphToJSON()

static void denoptim.io.DenoptimIO.writeGraphToJSON ( File  file,
DGraph  graph 
) throws DENOPTIMException
static

Writes the graph to JSON file.

Parameters
filethe file where to print
graphthe graphs to print
Exceptions
DENOPTIMException

Definition at line 2123 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphsToJSON().

Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.graph.DGraph.removeChainUpToBranching(), and denoptim.io.DenoptimIO.writeGraphToFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeGraphToSDF() [1/2]

static void denoptim.io.DenoptimIO.writeGraphToSDF ( File  file,
DGraph  graph,
boolean  append,
boolean  make3D,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the graph to SDF file.

Parameters
filethe file where to print.
graphthe of graph to print.
appenduse true to append to the file.
make3Duse true to convert graph to 3d.
Exceptions
DENOPTIMException

Definition at line 2031 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphsToSDF().

Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.utils.MoleculeUtils.extractIACForSubgraph(), denoptim.ga.GraphOperations.performMutation(), and denoptim.io.DenoptimIO.writeGraphToFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeGraphToSDF() [2/2]

static void denoptim.io.DenoptimIO.writeGraphToSDF ( File  file,
DGraph  graph,
boolean  append,
Logger  logger,
Randomizer  randomizer 
) throws DENOPTIMException
static

Writes the graph to SDF file.

Parameters
filethe file where to print
graphthe of graph to print
appenduse true to append to the file
Exceptions
DENOPTIMException

Definition at line 2050 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeGraphsToSDF().

Here is the call graph for this function:

◆ writeMol2File()

static void denoptim.io.DenoptimIO.writeMol2File ( String  fileName,
IAtomContainer  mol,
boolean  append 
) throws DENOPTIMException
static

Definition at line 620 of file DenoptimIO.java.

◆ writeSDFFile() [1/4]

static void denoptim.io.DenoptimIO.writeSDFFile ( String  fileName,
IAtomContainer  mol 
) throws DENOPTIMException
static

Writes IAtomContainer to SDF file.

Parameters
fileNameThe file to be write to.
molThe molecules to be written.
Exceptions
DENOPTIMException

Definition at line 534 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree(), denoptim.fragmenter.FragmenterTools.checkElementalAnalysisAgainstFormula(), denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.fragmenter.FragmenterTools.filterStrucutresBySMARTS(), denoptim.utils.MoleculeUtils.getSMILESForMolecule(), denoptim.gui.MoleculeViewPanel.loadChemicalStructure(), denoptim.gui.FragmentViewPanel.loadStructure(), denoptim.graph.rings.PathSubGraph.makeMolecularRepresentation(), denoptim.utils.DummyAtomHandler.removeDummyInHapto(), denoptim.graph.rings.RingClosureFinder.reportForDebug(), denoptim.task.FitnessTask.runFitnessProvider(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), denoptim.programs.moldecularmodelbuilder.MolecularModelBuilder.runProgram(), denoptim.programs.genetweeker.GeneOpsRunner.runXOver(), denoptim.fragmenter.ParallelFragmentationAlgorithm.splitInputForThreads(), denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.fitness.FitnessProviderTest.testGetFitnessWithParametrizedDescriptors(), denoptim.fitness.FitnessExpressionParserTest.testProcessExpressions(), denoptim.io.DenoptimIOTest.testReadLightWeightCandidate(), denoptim.fragmenter.ParallelFragmentationAlgorithmTest.testSplitInputForThreads(), denoptim.io.DenoptimIO.writeCandidatesToFile(), denoptim.io.DenoptimIO.writeCandidateToFile(), denoptim.io.DenoptimIO.writeGraphsToSDF(), denoptim.io.DenoptimIO.writeSDFFile(), and denoptim.io.DenoptimIO.writeVertexesToSDF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeSDFFile() [2/4]

static void denoptim.io.DenoptimIO.writeSDFFile ( String  fileName,
IAtomContainer  mol,
boolean  append 
) throws DENOPTIMException
static

Writes an IAtomContainer to SDF file.

Parameters
fileNameThe file to be written to
molThe molecule to be written
append
Exceptions
DENOPTIMException

Definition at line 599 of file DenoptimIO.java.

◆ writeSDFFile() [3/4]

static void denoptim.io.DenoptimIO.writeSDFFile ( String  fileName,
List< IAtomContainer >  mols 
) throws DENOPTIMException
static

Writes IAtomContainers to SDF file.

Parameters
fileNameThe file to be write to.
molsThe molecules to be written.
Exceptions
DENOPTIMException

Definition at line 550 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeSDFFile().

Here is the call graph for this function:

◆ writeSDFFile() [4/4]

static void denoptim.io.DenoptimIO.writeSDFFile ( String  fileName,
List< IAtomContainer >  mols,
boolean  append 
) throws DENOPTIMException
static

Writes a set of IAtomContainers to SDF file.

Parameters
fileNameThe file to be written to
molsThe molecules to be written
appenduse true to append to the file
Exceptions
DENOPTIMException

Definition at line 565 of file DenoptimIO.java.

◆ writeSmiles()

static void denoptim.io.DenoptimIO.writeSmiles ( String  fileName,
String  smiles,
boolean  append 
) throws DENOPTIMException
static

Writes a single smiles string to the specified file.

Parameters
fileNameThe file to be written to
smiles
appendif true append to the file
Exceptions
DENOPTIMException

Definition at line 708 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.NL.

◆ writeSmilesSet()

static void denoptim.io.DenoptimIO.writeSmilesSet ( String  fileName,
String[]  smiles,
boolean  append 
) throws DENOPTIMException
static

Writes multiple smiles string array to the specified file.

Parameters
fileNameThe file to be written to
smilesarray of smiles strings to be written
appendif true append to the file
Exceptions
DENOPTIMException

Definition at line 675 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.NL.

◆ writeVertexesToFile() [1/2]

static File denoptim.io.DenoptimIO.writeVertexesToFile ( File  file,
FileFormat  format,
List< Vertex vertexes 
) throws DENOPTIMException
static

Writes vertexes to file.

Always overwrites.

Parameters
filethe file where to print
formathow to print vertexes on file
vertexesthe list of vertexes to print
Exceptions
DENOPTIMException

Definition at line 386 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeVertexesToFile().

Referenced by denoptim.fragmenter.ConformerExtractorTask.call(), denoptim.fragmenter.FragmenterTools.fragmentation(), denoptim.gui.GUIGraphHandler.initialize(), denoptim.gui.GUIVertexInspector.initialize(), denoptim.fragmenter.FragmenterTools.manageFragmentCollection(), denoptim.io.DenoptimIOTest.testAppendToJSON(), denoptim.fragmenter.FragmentClustererTest.testCluster(), denoptim.io.DenoptimIOTest.testIOEmptyVertex(), denoptim.io.DenoptimIOTest.testIOMolFragment(), denoptim.io.DenoptimIOTest.testIOTemplate(), denoptim.io.DenoptimIO.writeVertexesToFile(), and denoptim.io.DenoptimIO.writeVertexToFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeVertexesToFile() [2/2]

static File denoptim.io.DenoptimIO.writeVertexesToFile ( File  file,
FileFormat  format,
List< Vertex vertexes,
boolean  append 
) throws DENOPTIMException
static

Writes vertexes to file.

Always overwrites.

Parameters
filethe file where to print
formathow to print vertexes on file
vertexesthe list of vertexes to print
Exceptions
DENOPTIMException

Definition at line 420 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeVertexesToJSON(), and denoptim.io.DenoptimIO.writeVertexesToSDF().

Here is the call graph for this function:

◆ writeVertexesToJSON() [1/2]

static void denoptim.io.DenoptimIO.writeVertexesToJSON ( File  file,
List< Vertex vertexes 
) throws DENOPTIMException
static

Writes vertexes to JSON file.

Always overwrites.

Parameters
filethe file where to print.
vertexesthe list of vertexes to print.
Exceptions
DENOPTIMException

Definition at line 453 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeVertexesToJSON().

Referenced by denoptim.io.DenoptimIO.writeVertexesToFile(), and denoptim.io.DenoptimIO.writeVertexesToJSON().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeVertexesToJSON() [2/2]

static void denoptim.io.DenoptimIO.writeVertexesToJSON ( File  file,
List< Vertex vertexes,
boolean  append 
) throws DENOPTIMException
static

Writes vertexes to JSON file.

Always overwrites.

Parameters
filethe file where to print.
vertexesthe list of vertexes to print.
appenduse true to append to the existing list of vertexes found in the file.
Exceptions
DENOPTIMException

Definition at line 470 of file DenoptimIO.java.

References denoptim.json.DENOPTIMgson.getWriter(), denoptim.io.DenoptimIO.readDENOPTIMVertexesFromJSONFile(), and denoptim.io.DenoptimIO.writeData().

Here is the call graph for this function:

◆ writeVertexesToSDF()

static void denoptim.io.DenoptimIO.writeVertexesToSDF ( File  file,
List< Vertex vertexes,
boolean  append 
) throws DENOPTIMException
static

Write a list of vertexes to file.

Parameters
filethe file to write to.
vertexesthe vertexes to be written.
appenduse true to append instead of overwriting.
Exceptions
DENOPTIMException

Definition at line 513 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeSDFFile().

Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.FragmentIsomorphismInspector.getMappings(), denoptim.graph.FragmentIsomorphismInspector.isomorphismExists(), denoptim.io.DenoptimIOTest.testReadAllAPClasses(), denoptim.io.DenoptimIO.writeVertexesToFile(), and denoptim.io.DenoptimIO.writeVertexToSDF().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeVertexToFile()

static File denoptim.io.DenoptimIO.writeVertexToFile ( File  file,
FileFormat  format,
Vertex  vertex,
boolean  append 
) throws DENOPTIMException
static

Writes vertexes to file.

Always overwrites.

Parameters
filethe file where to print
formathow to print vertexes on file
vertexthe vertex to print
Exceptions
DENOPTIMException

Definition at line 402 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeVertexesToFile().

Referenced by denoptim.fragmenter.FragmenterTools.manageFragmentCollection().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeVertexToSDF()

static void denoptim.io.DenoptimIO.writeVertexToSDF ( String  pathName,
Vertex  vertex 
) throws DENOPTIMException
static

Writes a vertex to an SDF file.

Parameters
pathNamepathname where to write.
verticeslist of vertices to write.
Exceptions
DENOPTIMException

Definition at line 495 of file DenoptimIO.java.

References denoptim.io.DenoptimIO.writeVertexesToSDF().

Here is the call graph for this function:

◆ writeXYZFile()

static void denoptim.io.DenoptimIO.writeXYZFile ( String  fileName,
IAtomContainer  mol,
boolean  append 
) throws DENOPTIMException
static

Definition at line 643 of file DenoptimIO.java.

Member Data Documentation

◆ builder

final IChemObjectBuilder denoptim.io.DenoptimIO.builder
staticprivate
Initial value:
=
SilentChemObjectBuilder.getInstance()

Definition at line 125 of file DenoptimIO.java.

Referenced by denoptim.io.DenoptimIO.writeGraphsToSDF().

◆ FS

◆ NL


The documentation for this class was generated from the following file: