We develop an improved version of PROFESY, a novel method for ab-initio prediction of protein tertiary structures based on the fragment assembly and global optimization. In contrast to the primitive version presented earlier, where hydrogen bond was defined only in terms of inter-atom distance, the angle dependence is now correctly incorporated. This new feature allows us to obtain low-energy conformations with reasonable amount of beta strands, in contrast to earlier version where fraction alpha helices was excessively large on average. In order to enhance the performance of the prediction method, we optimize the linear parameters of the energy function, so that the native-like conformations become energetically more favorable than the non-native ones for proteins with known structures. We test the feasibility of the parameter optimization procedure by applying it to the training set consisting of two proteins of structural class alpha+beta: 1FSD and 1PQS. We use the resulting parameter set for the jackknife test, using several proteins with various structural classes as test sets. The results are quite promising. In particular, for protein 2GB1, the prediction results improve dramatically with the optimized the parameter set compared to the original parameters, despite the fact that it is NOT INCLUDED IN THE TRAINING SET. The result suggests that parameters trained for a relatively small number of proteins are transferrable to other proteins to some extent.