Moleculardna and AuNP physicslist

In the molecular DNA example, I am trying to use geant4dna physics for gold nanoparticles. To create PhysicisList, I followed the example given by AuNP. My only changes were to replace physicslist and main files from AuNP’s example. Attached are the files that I used.
PhysicsList.cc (16.3 KB)
PhysicsListMessenger.cc (3.2 KB)
PhysicsList.hh (3.1 KB)
PhysicsListMessenger.hh (2.7 KB)
molecular.cc (4.2 KB)

However, I encountered the following compilation error. There is something I am missing and I am confused about this error. Do you have any ideas on how to resolve this? Currently, I’m using Geant 4.11.1.0.

> [akap@ldragon1 build]$ cmake ..
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /akap/G411.1.0/test/moleculardna/build
> [akap@ldragon1 build]$ make -j20
> Consolidate compiler generated dependencies of target molecular
> [  2%] Building CXX object CMakeFiles/molecular.dir/molecular.cc.o
>/akap/G411.1.0/test/moleculardna/molecular.cc: In function ‘int main(int, char**)’:
> /akap/G411.1.0/test/moleculardna/molecular.cc:83:27: error: no matching function for call to ‘PhysicsList::PhysicsL          ist()’
>    83 |   PhysicsList* phys = new PhysicsList;
>       |                           ^~~~~~~~~~~
> In file included from /akap/G411.1.0/test/moleculardna/molecular.cc:49:
>/akap/G411.1.0/test/moleculardna/PhysicsList.hh:43:12: note: candidate: ‘PhysicsList::PhysicsList(const G4int&)’
>    43 |   explicit PhysicsList(const G4int& list);
>       |            ^~~~~~~~~~~
>/akap/G411.1.0/test/moleculardna/PhysicsList.hh:43:12: note:   candidate expects 1 argument, 0 provided
> /akap/G411.1.0/test/moleculardna/PhysicsList.hh:40:7: note: candidate: ‘PhysicsList::PhysicsList(const PhysicsList&          )’
>    40 | class PhysicsList : public G4VModularPhysicsList
>       |       ^~~~~~~~~~~
> /akap/G411.1.0/test/moleculardna/PhysicsList.hh:40:7: note:   candidate expects 1 argument, 0 provided
> make[2]: *** [CMakeFiles/molecular.dir/molecular.cc.o] Error 1
> make[1]: *** [CMakeFiles/molecular.dir/all] Error 2
> make: *** [all] Error 2

Are the files you attached the correct ones? In PhysicsList.hh there’s no constructor with that signature.

Yes, I used those attached files. I copied these files from the AuNP example and tried to use them in moleculardna example for gold NP. These files work fine for AuNP example.

Could you please explain what you mean by

In PhysicsList.hh there’s no constructor with that signature.

I didn’t get that (sorry little knowledge about C++). Any suggestion for using the correct constructor?

The compile error posted, the compiler indicates

but at line 43 In the PhysicsList.hh file you attached in the original post, the code that is appear is not:

 explicit PhysicsList(const G4int& list);
1 Like

Please I need geoetrey construction for DNA
to study single strand breaks (SSB) and double strand breaks (DSB) to DNA
please help me

@bmorgan Thanks a lot. Now it’s working without any compilation error. I just delete everything and recompile and it works without any modifications.

@ReemMM-M You can try moleculardna examples. It’s easier to construct DNA models as per your need using python. Well-written documentation is available there. I hope it helps.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.