1) Creates a new class which implements the PatternComputationMethod interface or which extends the
PatternComputation class in the melting.patternModels package.
If the structure computed by the new class is already registered by the program, you can create your class
in the appropriate package (cngPatterns, cricksPair, InternalLoops, longBulge, longDanglingEnds,
secondDanglingEnds, singleBulge, singleDanglingEnds, singleMismatch, specificAcids, tandemMismatches or wobble).
The PatternComputation class contains all the base implementations of each PatternComputationMethod method
except for this function : boolean isApplicable(Environment environment, int pos1, int pos2).
You have to implement this method to compute the enthalpy and entropy of a motif in the duplex.
You also have to override the function boolean isApplicable(Environment environment, int pos1,int pos2)
to define the conditions of application of the new thermodynamic model.
2) Always register the new model in the RegisterMethod class in the melting.configuration package. Depending on which structure in the duplex your new model computes, you will have to add one of these following lines :
private void initialiseCricksMethods(){ [...] // To map the model name to the class which // implements it. cricksMethod.put("model-Name", ClassName.class); }
private void initialiseSingleMismatchMethods(){ [...] // To map the model name to the class which implements it. singleMismatchMethod.put("model-Name", ClassName.class); }
private void initialiseTandemMismatchMethods(){ [...] // To map the model name to the class which // implements it. tandemMismatchMethod.put("model-Name", ClassName.class); }
private void initialiseWobbleMismatchMethods(){ [...] // To map the model name to the class which // implements it. wobbleMethod.put("model-Name", ClassName.class); }
private void initialiseInternalLoopMethods(){ [...] // To map the model name to the class which // implements it. internalLoopMethod.put("model-Name", ClassName.class); }
private void initialiseSingleBulgeLoopMethods(){ [...] // To map the model name to the class which // implements it. singleBulgeLoopMethod.put("model-Name", ClassName.class); }
private void initialiseLongBulgeLoopMethods(){ [...] // To map the model name to the class which // implements it. longBulgeLoopMethod.put("model-Name", ClassName.class); }
private void initialiseSingleDanglingEndMethods(){ [...] // To map the model name to the class which // implements it. singleDanglingEndMethod.put("model-Name", ClassName.class); }
private void initialiseDoubleDanglingEndMethods(){ [...] // To map the model name to the class which // implements it. doubleDanglingEndMethod.put("model-Name", ClassName.class); }
private void initialiseLongDanglingEndMethods(){ [...] // To map the model name to the class which // implements it. longDanglingEndMethod.put("model-Name", ClassName.class); }
private void initialiseCNGRepeatsMethods(){ [...] // To map the model name to the class which // implements it. CNGRepeatsMethod.put("model-Name", ClassName.class); }
private void initialiseInosineMethods(){ [...] // To map the model name to the class // which implements it. inosineMethod.put("model-Name", ClassName.class); }
private void initialiseAzobenzeneMethods(){ [...] // To map the model name to the class // which implements it. azobenzeneMethod.put("model-Name", ClassName.class); }
private void initialiseLockedAcidMethods(){ [...] // To map the model name to the class which // implements it. lockedAcidMethod.put("model-Name", ClassName.class); }
private void initialiseHydroxyadenosineMethods(){ [...] // To map the model name to the class which // implements it. hydroxyadenosineMethod.put("model-Name", ClassName.class); }
3) Create a public static String defaultFileName as instance variable of the class. It represents
the name of the XML file containing the thermodynamic parameters for this model. You must print it if the
user requires the verbose mode. You can create another public static String which contains the
thermodynamic formula of the model and print it during the verbose mode.
For each message you want to print during the verbose mode, you must write this line :
OptionManagement.meltingLogger.log(Level.FINE, "message to print");
4) You always must override or implement this function : void initialiseFileName(String methodName). It is necessary to write that the new class can use the thermodynamic parameters of its default File or use the thermodynamic parameters of another file required by the user.
@Override public void initialiseFileName(String methodName){ super.initialiseFileName(methodName); if (this.fileName == null){ this.fileName = defaultFileName; // The public static String // of this class. } }
Some base implementations have been written for some non specific thermodynamic models, maybe your new class can extend one of the following base implementations. (but you always have to do the steps 1 to 4)