20package denoptim.constants;
23import java.util.ArrayList;
24import java.util.Arrays;
25import java.util.Collections;
26import java.util.HashMap;
27import java.util.HashSet;
31import org.openscience.cdk.interfaces.IAtom;
32import org.openscience.cdk.interfaces.IAtomContainer;
34import denoptim.exception.DENOPTIMException;
35import denoptim.files.FileFormat;
36import denoptim.files.FileUtils;
37import denoptim.graph.APClass;
38import denoptim.graph.AttachmentPoint;
39import denoptim.graph.Edge.BondType;
40import denoptim.graph.Vertex;
41import denoptim.graph.rings.RingClosingAttractor;
53 public static final String
EOL = System.getProperty(
"line.separator");
58 public static final String
FSEP = System.getProperty(
"file.separator");
66 File configFolder =
new File(
67 System.getProperty(
"user.home") +
FSEP +
".denoptim");
70 if (!configFolder.exists())
73 configFolder.getAbsolutePath());
77 +
"configuration folder '"
78 + configFolder.getAbsolutePath() +
"'");
84 String msg =
"ERROR: unable to make configuration folder '"
85 + configFolder.getAbsolutePath() +
"'";
86 System.err.println(msg);
101 Map<String, Integer> result =
new HashMap<>();
122 return Collections.unmodifiableMap(result);
126 new HashSet<>(Arrays.asList(
new String[] {
"C",
127 "N",
"S",
"O",
"P",
"F",
"Br",
"Cl",
"I",
"B"}
131 new HashSet<>(Arrays.asList(
new String[] {
"H",
"He",
132 "Li",
"Be",
"B",
"C",
"N",
"O",
"F",
"Ne",
133 "Na",
"Mg",
"Al",
"SiP",
"S",
"Cl",
"Ar",
134 "K",
"Ca",
"Ga",
"Ge",
"As",
"Se",
"Br",
"Kr",
135 "Rb",
"Sr",
"In",
"Sn",
"Sb",
"Te",
"I",
"Xe",
136 "Cs",
"Ba",
"Tl",
"Pb",
"Bi",
"Po",
"At",
"Rn",
138 "Sc",
"Ti",
"V",
"Cr",
"Mn",
"Fe",
"Co",
"Ni",
140 "Y",
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
"Rh",
"Pd",
142 "La",
"Hf",
"Ta",
"W",
"Re",
"Os",
"Ir",
"Pt",
144 "Ac",
"Ce",
"Pr",
"Nd",
"Pm",
"Sm",
"Eu",
"Gd",
146 "Ho",
"Er",
"Tm",
"Yb",
"Lu",
"Th",
"Pa",
"U",
148 "Am",
"Cm",
"Bk",
"Cf",
"Es",
"Fm",
"Md",
"No",
156 public static ArrayList<String>
ALL_METALS =
new ArrayList<String>(
157 Arrays.asList(
"Li",
"Na",
"K",
"Rb",
"Cs",
"Fr",
158 "Be",
"Mg",
"Ca",
"Sr",
"Ba",
"Ra",
159 "Al",
"Ga",
"In",
"Tl",
163 "Sc",
"Ti",
"V",
"Cr",
"Mn",
"Fe",
"Co",
"Ni",
"Cu",
"Zn",
164 "Y",
"Zr",
"Nb",
"Mo",
"Tc",
"Ru",
"Rh",
"Pd",
"Ag",
"Cd",
165 "Hf",
"Ta",
"W",
"Re",
"Os",
"Ir",
"Pt",
"Au",
"Hg",
166 "La",
"Ce",
"Pr",
"Nd",
"Pm",
"Sm",
"Eu",
"Gd",
"Tb",
"Dy",
"Ho",
"Er",
168 "Ac",
"Th",
"Pa",
"U",
"Np",
"Pu",
"Am",
"Cm",
"Bk",
"Cf",
"Es",
"Fm",
172 new HashSet<>(Arrays.asList(
new String[] {
"C",
"H",
173 "N",
"S",
"O",
"P",
"F",
"Br",
"Cl",
"I",
"B",
"As",
174 "Si",
"Sn",
"Cd",
"Hg",
"Zn",
"Te",
"Ge",
"Sb",
"Se"}
178 new HashSet<>(Arrays.asList(
new String[] {
".txt",
275 public static final double INVPI = 1.0/Math.sqrt(Math.PI * 2);
308 public static final String
APSTAG =
"ATTACHMENT_POINTS";
469 public static final Object
LINKAPS =
"LINKTOGRAPHSAP";
General set of constants used in DENOPTIM.
static final Set< String > ORGANIC_SUBSET_ELEMENTS
static final String GRAPHTAG
SDF tag containing graph encoding.
static final Object FORMULASTR
Property name used to store molecular formula as string in an atom container.
static final File RECENTFILESLIST
List of recent files.
static final String APCMAPIGNORE
Keyword identifying compatibility matrix file lines with comments.
static final int MOLDIGITS
static final Map< String, Integer > VALENCE_MAP
static final String VERTEXJSONTAG
SDF tag containing vertex encoding in JSON format.
static final String ATMPROPAPS
String tag of Atom property used to store attachment points.
static final String INCHIKEYTAG
SDF tag containing the unique identifier of a candidate.
static ArrayList< String > ALL_METALS
Elemental symbols of all metal elements, including alkaly, transition metals, actinides,...
static final String APCMAPAP2BO
Keyword identifying compatibility matrix file lines with APClass-to-Bond order map.
static final Set< String > ALL_ELEMENTS
static final String UNREADABLEFILEPOSTFIX
Postfix used to mark a file that cannot be read.
static final String PROVENANCE
SDF tag containing provenance data for a graph.
static final Object MOLPROPAPxBOND
Key for IAtomContainer property containing the map of AttachmentPoints per atom.
static final double INVPI
static final Object GRAPHBRANCHID
Property of Vertex used to record the identity of the graph branch holding that Vertex.
static final File GLOBALCONFIG
Global configuration folder.
static final String APSTAG
SDF tag defining attachment points.
static final String MWSLOTFRAGSUNQFILENANEEND
Final part of filename used to collect unique fragments in a certain molecular weight slot.
static final String CANDIDATE2DEXTENSION
Extension of output file with 2D picture of candidate.
static final String SEPARATORAPPROPAAP
Separator between atom index and APClass in molecular property.
static final String SERGFILENAMEEXT
Extension filenames of serialized graphs.
static final String EOL
new line character
static final String PARENTGRAPHTAG
SDF tag defining the ID of a parent graph (used in FSE)
static final String ATMPROPVERTEXID
String tag of Atom property used to store the unique ID of the Vertex corresponding to the molecular ...
static final double FLOATCOMPARISONTOLERANCE
Smallest difference for comparison of double and float numbers.
static final String SEPARATORAPPROPATMS
Separator between APs on different atoms in molecular property.
static final String APCMAPCAPPING
Keyword identifying compatibility matrix file lines with capping rules.
static final String GRAPHLEVELTAG
SDF tag defining the graph generating level in an FSE run.
static final String GCODETAG
SDF tag containing graph ID.
static final Object RCAPROPRINGUSER
Property of a IAtom representing a RingClosingAttractor.
static final Object RCAPROPCHORDBNDTYP
Property of a IAtom representing a RingClosingAttractor.
static final String SEPARATORAPPROPSCL
Separator between APClass and APSubClass and coordinates.
static final Set< String > ALLOWED_EXTENSIONS
static final String FITFILENAMEPREFIX
Prefix of filenames for input/output files related to fitness.
static final String GAGENSUMMARYHEADER
Header of text files collection generation details.
static final String GRAPHFORMATSTRING
Label used to point at text based graph format.
static final String UNIQUEIDTAG
SDF tag containing the unique identifier of a candidate.
static final Object MOLPROPAPxVID
Key for IAtomContainer property containing the map of AttachmentPoints per vertex ID.
static final String GAGENDIRNAMEROOT
Prefix for generation folders.
static final FileFormat TMPFRAGFILEFORMAT
Format for intermediate files used during fragmentation.
static final String CUTRULKEYWORD
Keyword that identifies rows defining cutting rules in files collecting cutting rules.
static final String GRAPHJSONTAG
SDF tag containing graph encoding in JSON format.
static final String SEPARATORAPPROPXYZ
Separator between coordinates.
static final String MWSLOTFRAGSFILENAMEROOT
Initial part of filename used to collect fragments belonging to a certain molecular weight slot.
static final Object MOLPROPAPxEDGE
Key for IAtomContainer property containing the map of AttachmentPoints per edge.
static final String ATMPROPVERTEXPATH
Name of Atom property used to store the unique ID of the Vertex that owns the atom and the IDs of any...
static final String APCMAPFORBIDDENEND
Keyword identifying compatibility matrix file lines with forbidden ends.
static final String MOLERRORTAG
SDF tag containing errors during execution of molecule specific tasks.
static File ensureConfigFolderExists()
static final String SERGFILENAMEROOT
Prefix filenames of serialized graphs.
static Map< String, Integer > createMap()
static final String DUMMYATMSYMBOL
Symbol of dummy atom.
static final String SMILESTAG
SDF tag containing the SMILES of a candidate.
static final Object APORIGINALLENGTH
Key of AP property where we save the original length of the AP vector.
static final Object MOLPROPAPxATOM
Key for IAtomContainer property containing the map of AttachmentPoints per vertex ID.
static final String APCMAPCOMPRULE
Keyword identifying compatibility matrix file lines with APClass compatibility rules.
static final Object RCAPROPAPCTORCA
Property of a IAtom representing a RingClosingAttractor.
static final String FSEP
file separator
static final Set< String > ALLOWED_ELEMENTS
static final Object ISOMORPHICFAMILYID
Property used to store the identifier of the family of isomorphic fragments that owns a fragment.
static final String FSEIDXNAMEROOT
Prefix for graph indexing files.
static final String FITFILENAMEEXTOUT
Ending and extension of output file of external fitness provider.
static final String GRAPHFORMATBYTE
Label used to point at byte based graph format.
static final Object STOREDVID
Key of the property remembering vertex IDs.
static final String SEPARATORAPPROPAPS
Separator between APs on same atom in molecular property.
static final String FITNESSTAG
SDF tag containing the fitness of a candidate.
static final Object LINKAPS
Key of property used to records references of APs.
static final String ATMPROPORIGINALATMID
Name of Atom property used to store the original position of an atom in the atom list of the fragment...
static final String FITFILENAMEEXTIN
Ending and extension of input file of external fitness provider.
static final Object VRTSYMMSETID
Property of Vertex used to keep mark symmetric vertexes during graph operations and before defining t...
static final String MWSLOTFRAGSALLFILENANEEND
Final part of filename used to collect all samples fragments in a certain molecular weight slot inclu...
static final String BONDPROPROTATABLE
String tag of Bond's property used to store the property of being rotatable.
static boolean createDirectory(String fileName)
Creates a directory.