23 #include "../include/VarData.h" 24 #define COMM_STRETCH 1 27 int main(
int argc,
char **argv){
31 sprintf(ConfF,
"Polymers.conf");
33 int *FilePos = (
int *)calloc(argc,
sizeof(
int));
35 double StretchFact = 1.;
37 double RefPos[3] = {.0,.0,.0};
38 sprintf(nome1,
"ciccia.dat");
39 sprintf(nome2,
"resume.dat");
40 for(
int i=1;i<argc;i++){
41 if(argv[i][0] !=
'-'){
45 else if(!strcmp(*(argv+i),
"--Stretch")){
47 sscanf(*(argv+i+1),
"%lf",&StretchFact);
49 Comando = COMM_STRETCH;
52 else if(!strcmp(*(argv+i),
"--Rem")){
54 Comando = COMM_REMOVE;
57 else if(!strcmp(*(argv+i),
"--Shift")){
60 sscanf(*(argv+d+i+1),
"%lf",RefPos+d);
65 else if(!strcmp(*(argv+i),
"-c")){
67 sscanf(*(argv+i+1),
"%s",ConfF);
73 sprintf(nome2,argv[FilePos[0]]);
75 sprintf(nome1,argv[FilePos[0]]);
76 sprintf(nome2,argv[FilePos[1]]);
78 printf(
"Apro %s e %s\n",nome1,nome2);
80 Dat->
Open(nome1,BF_CHAIN);
81 char cSystem[STRSIZE];
83 if(Comando == COMM_STRETCH){
85 Dat->Gen->
Edge[d] = StretchFact*Dat->Gen->
Edge[d];
86 for(
int p=0;p<Dat->Gen->NPart;p++){
88 Dat->
Pm[p].
Pos[d] = StretchFact*Dat->
Pm[p].
Pos[d];
91 for(
int n=0;n<Dat->NNano;n++){
93 Dat->
Nano[n].
Pos[d] *= StretchFact;
94 Dat->
Nano[n].
Rad *= StretchFact;
98 if(Comando == COMM_REMOVE){
106 printf(
"Te se qe te ve be ne?\n");
BLOCK * Block
Information for every block.
void SysInfo(char *cSystem)
Print a string with the system information.
NANO * Nano
Extra particle.
bool Write(char *OutFile)
Writes a "system-file" or a "x y z" file".
double Edge[4]
xyzr edges of the simulation box
double Height
Height of the cylinder.
double Pos[3]
xyz Position of the particle
bool Open(char *InFile, int BF)
Open the.
int DefSoft(char *nome2, char *ConfF)
Define and write the system as described in the conf file.
Reads and elaborates a system of chains.
PART * Pm
Particle information of all particle.